Loading api/current.xml +39 −0 Original line number Diff line number Diff line Loading @@ -20395,6 +20395,19 @@ <parameter name="view" type="android.view.View"> </parameter> </method> <method name="setCustomView" return="android.app.ActionBar.Tab" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="layoutResId" type="int"> </parameter> </method> <method name="setIcon" return="android.app.ActionBar.Tab" abstract="true" Loading @@ -20408,6 +20421,19 @@ <parameter name="icon" type="android.graphics.drawable.Drawable"> </parameter> </method> <method name="setIcon" return="android.app.ActionBar.Tab" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="resId" type="int"> </parameter> </method> <method name="setTabListener" return="android.app.ActionBar.Tab" abstract="true" Loading Loading @@ -20447,6 +20473,19 @@ <parameter name="text" type="java.lang.CharSequence"> </parameter> </method> <method name="setText" return="android.app.ActionBar.Tab" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="resId" type="int"> </parameter> </method> <field name="INVALID_POSITION" type="int" transient="false" core/java/android/app/ActionBar.java +26 −0 Original line number Diff line number Diff line Loading @@ -589,6 +589,14 @@ public abstract class ActionBar { */ public abstract Tab setIcon(Drawable icon); /** * Set the icon displayed on this tab. * * @param resId Resource ID referring to the drawable to use as an icon * @return The current instance for call chaining */ public abstract Tab setIcon(int resId); /** * Set the text displayed on this tab. Text may be truncated if there is not * room to display the entire string. Loading @@ -598,6 +606,15 @@ public abstract class ActionBar { */ public abstract Tab setText(CharSequence text); /** * Set the text displayed on this tab. Text may be truncated if there is not * room to display the entire string. * * @param resId A resource ID referring to the text that should be displayed * @return The current instance for call chaining */ public abstract Tab setText(int resId); /** * Set a custom view to be used for this tab. This overrides values set by * {@link #setText(CharSequence)} and {@link #setIcon(Drawable)}. Loading @@ -607,6 +624,15 @@ public abstract class ActionBar { */ public abstract Tab setCustomView(View view); /** * Set a custom view to be used for this tab. This overrides values set by * {@link #setText(CharSequence)} and {@link #setIcon(Drawable)}. * * @param layoutResId A layout resource to inflate and use as a custom tab view * @return The current instance for call chaining */ public abstract Tab setCustomView(int layoutResId); /** * Retrieve a previously set custom view for this tab. * Loading core/java/com/android/internal/app/ActionBarImpl.java +16 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.content.Context; import android.graphics.drawable.Drawable; import android.os.Handler; import android.view.ActionMode; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; Loading Loading @@ -562,6 +563,11 @@ public class ActionBarImpl extends ActionBar { return this; } @Override public Tab setCustomView(int layoutResId) { return setCustomView(LayoutInflater.from(mContext).inflate(layoutResId, null)); } @Override public Drawable getIcon() { return mIcon; Loading @@ -587,12 +593,22 @@ public class ActionBarImpl extends ActionBar { return this; } @Override public Tab setIcon(int resId) { return setIcon(mContext.getResources().getDrawable(resId)); } @Override public Tab setText(CharSequence text) { mText = text; return this; } @Override public Tab setText(int resId) { return setText(mContext.getResources().getText(resId)); } @Override public void select() { selectTab(this); Loading Loading
api/current.xml +39 −0 Original line number Diff line number Diff line Loading @@ -20395,6 +20395,19 @@ <parameter name="view" type="android.view.View"> </parameter> </method> <method name="setCustomView" return="android.app.ActionBar.Tab" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="layoutResId" type="int"> </parameter> </method> <method name="setIcon" return="android.app.ActionBar.Tab" abstract="true" Loading @@ -20408,6 +20421,19 @@ <parameter name="icon" type="android.graphics.drawable.Drawable"> </parameter> </method> <method name="setIcon" return="android.app.ActionBar.Tab" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="resId" type="int"> </parameter> </method> <method name="setTabListener" return="android.app.ActionBar.Tab" abstract="true" Loading Loading @@ -20447,6 +20473,19 @@ <parameter name="text" type="java.lang.CharSequence"> </parameter> </method> <method name="setText" return="android.app.ActionBar.Tab" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="resId" type="int"> </parameter> </method> <field name="INVALID_POSITION" type="int" transient="false"
core/java/android/app/ActionBar.java +26 −0 Original line number Diff line number Diff line Loading @@ -589,6 +589,14 @@ public abstract class ActionBar { */ public abstract Tab setIcon(Drawable icon); /** * Set the icon displayed on this tab. * * @param resId Resource ID referring to the drawable to use as an icon * @return The current instance for call chaining */ public abstract Tab setIcon(int resId); /** * Set the text displayed on this tab. Text may be truncated if there is not * room to display the entire string. Loading @@ -598,6 +606,15 @@ public abstract class ActionBar { */ public abstract Tab setText(CharSequence text); /** * Set the text displayed on this tab. Text may be truncated if there is not * room to display the entire string. * * @param resId A resource ID referring to the text that should be displayed * @return The current instance for call chaining */ public abstract Tab setText(int resId); /** * Set a custom view to be used for this tab. This overrides values set by * {@link #setText(CharSequence)} and {@link #setIcon(Drawable)}. Loading @@ -607,6 +624,15 @@ public abstract class ActionBar { */ public abstract Tab setCustomView(View view); /** * Set a custom view to be used for this tab. This overrides values set by * {@link #setText(CharSequence)} and {@link #setIcon(Drawable)}. * * @param layoutResId A layout resource to inflate and use as a custom tab view * @return The current instance for call chaining */ public abstract Tab setCustomView(int layoutResId); /** * Retrieve a previously set custom view for this tab. * Loading
core/java/com/android/internal/app/ActionBarImpl.java +16 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.content.Context; import android.graphics.drawable.Drawable; import android.os.Handler; import android.view.ActionMode; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; Loading Loading @@ -562,6 +563,11 @@ public class ActionBarImpl extends ActionBar { return this; } @Override public Tab setCustomView(int layoutResId) { return setCustomView(LayoutInflater.from(mContext).inflate(layoutResId, null)); } @Override public Drawable getIcon() { return mIcon; Loading @@ -587,12 +593,22 @@ public class ActionBarImpl extends ActionBar { return this; } @Override public Tab setIcon(int resId) { return setIcon(mContext.getResources().getDrawable(resId)); } @Override public Tab setText(CharSequence text) { mText = text; return this; } @Override public Tab setText(int resId) { return setText(mContext.getResources().getText(resId)); } @Override public void select() { selectTab(this); Loading