Loading api/current.xml +264 −20 Original line number Diff line number Diff line Loading @@ -1894,7 +1894,7 @@ type="int" transient="false" volatile="false" value="16843549" value="16843550" static="true" final="true" deprecated="not deprecated" Loading @@ -1905,7 +1905,7 @@ type="int" transient="false" volatile="false" value="16843548" value="16843549" static="true" final="true" deprecated="not deprecated" Loading @@ -1916,7 +1916,7 @@ type="int" transient="false" volatile="false" value="16843550" value="16843551" static="true" final="true" deprecated="not deprecated" Loading Loading @@ -4717,6 +4717,17 @@ visibility="public" > </field> <field name="homeAsUpIndicator" type="int" transient="false" volatile="false" value="16843548" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="horizontalDivider" type="int" transient="false" Loading Loading @@ -9286,7 +9297,7 @@ type="int" transient="false" volatile="false" value="16843552" value="16843553" static="true" final="true" deprecated="not deprecated" Loading @@ -9297,7 +9308,7 @@ type="int" transient="false" volatile="false" value="16843551" value="16843552" static="true" final="true" deprecated="not deprecated" Loading Loading @@ -19449,6 +19460,17 @@ visibility="public" > </method> <method name="getNavigationItemCount" return="int" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getNavigationMode" return="int" abstract="true" Loading @@ -19460,7 +19482,7 @@ visibility="public" > </method> <method name="getSelectedNavigationItem" <method name="getSelectedNavigationIndex" return="int" abstract="true" native="false" Loading @@ -19471,6 +19493,17 @@ visibility="public" > </method> <method name="getSelectedNavigationItem" return="int" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="deprecated" visibility="public" > </method> <method name="getSelectedTab" return="android.app.ActionBar.Tab" abstract="true" Loading @@ -19493,6 +19526,19 @@ visibility="public" > </method> <method name="getTabAt" return="android.app.ActionBar.Tab" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="index" type="int"> </parameter> </method> <method name="getTitle" return="java.lang.CharSequence" abstract="true" Loading Loading @@ -19537,6 +19583,17 @@ visibility="public" > </method> <method name="removeAllTabs" return="void" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="removeTab" return="void" abstract="true" Loading Loading @@ -19590,6 +19647,32 @@ </parameter> </method> <method name="setCustomNavigationMode" return="void" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="deprecated" visibility="public" > <parameter name="view" type="android.view.View"> </parameter> </method> <method name="setCustomView" return="void" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="view" type="android.view.View"> </parameter> </method> <method name="setCustomView" return="void" abstract="true" native="false" Loading @@ -19601,6 +19684,8 @@ > <parameter name="view" type="android.view.View"> </parameter> <parameter name="layoutParams" type="android.app.ActionBar.LayoutParams"> </parameter> </method> <method name="setDisplayOptions" return="void" Loading Loading @@ -19637,7 +19722,7 @@ synchronized="false" static="false" final="false" deprecated="not deprecated" deprecated="deprecated" visibility="public" > <parameter name="adapter" type="android.widget.SpinnerAdapter"> Loading @@ -19652,7 +19737,7 @@ synchronized="false" static="false" final="false" deprecated="not deprecated" deprecated="deprecated" visibility="public" > <parameter name="adapter" type="android.widget.SpinnerAdapter"> Loading @@ -19662,6 +19747,34 @@ <parameter name="defaultSelectedPosition" type="int"> </parameter> </method> <method name="setListNavigationCallbacks" return="void" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="adapter" type="android.widget.SpinnerAdapter"> </parameter> <parameter name="callback" type="android.app.ActionBar.NavigationCallback"> </parameter> </method> <method name="setNavigationMode" return="void" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="mode" type="int"> </parameter> </method> <method name="setSelectedNavigationItem" return="void" abstract="true" Loading @@ -19682,7 +19795,7 @@ synchronized="false" static="false" final="false" deprecated="not deprecated" deprecated="deprecated" visibility="public" > </method> Loading Loading @@ -19719,7 +19832,7 @@ synchronized="false" static="false" final="false" deprecated="not deprecated" deprecated="deprecated" visibility="public" > </method> Loading Loading @@ -19761,6 +19874,39 @@ > </method> <field name="DISPLAY_HIDE_HOME" type="int" transient="false" volatile="false" value="4096" static="true" final="true" deprecated="deprecated" visibility="public" > </field> <field name="DISPLAY_HOME_AS_UP" type="int" transient="false" volatile="false" value="4" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="DISPLAY_SHOW_CUSTOM" type="int" transient="false" volatile="false" value="16" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="DISPLAY_SHOW_HOME" type="int" transient="false" volatile="false" Loading @@ -19771,22 +19917,22 @@ visibility="public" > </field> <field name="DISPLAY_USE_LOGO" <field name="DISPLAY_SHOW_TITLE" type="int" transient="false" volatile="false" value="1" value="8" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="NAVIGATION_MODE_CUSTOM" <field name="DISPLAY_USE_LOGO" type="int" transient="false" volatile="false" value="3" value="1" static="true" final="true" deprecated="not deprecated" Loading @@ -19794,6 +19940,17 @@ > </field> <field name="NAVIGATION_MODE_DROPDOWN_LIST" type="int" transient="false" volatile="false" value="1" static="true" final="true" deprecated="deprecated" visibility="public" > </field> <field name="NAVIGATION_MODE_LIST" type="int" transient="false" volatile="false" Loading Loading @@ -19827,6 +19984,93 @@ > </field> </class> <class name="ActionBar.LayoutParams" extends="android.view.ViewGroup.MarginLayoutParams" abstract="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <constructor name="ActionBar.LayoutParams" type="android.app.ActionBar.LayoutParams" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="c" type="android.content.Context"> </parameter> <parameter name="attrs" type="android.util.AttributeSet"> </parameter> </constructor> <constructor name="ActionBar.LayoutParams" type="android.app.ActionBar.LayoutParams" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="width" type="int"> </parameter> <parameter name="height" type="int"> </parameter> </constructor> <constructor name="ActionBar.LayoutParams" type="android.app.ActionBar.LayoutParams" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="width" type="int"> </parameter> <parameter name="height" type="int"> </parameter> <parameter name="gravity" type="int"> </parameter> </constructor> <constructor name="ActionBar.LayoutParams" type="android.app.ActionBar.LayoutParams" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="gravity" type="int"> </parameter> </constructor> <constructor name="ActionBar.LayoutParams" type="android.app.ActionBar.LayoutParams" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="source" type="android.app.ActionBar.LayoutParams"> </parameter> </constructor> <constructor name="ActionBar.LayoutParams" type="android.app.ActionBar.LayoutParams" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="source" type="android.view.ViewGroup.LayoutParams"> </parameter> </constructor> <field name="gravity" type="int" transient="false" volatile="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </field> </class> <interface name="ActionBar.NavigationCallback" abstract="true" static="true" Loading Loading @@ -19933,7 +20177,7 @@ > </method> <method name="setCustomView" return="void" return="android.app.ActionBar.Tab" abstract="true" native="false" synchronized="false" Loading @@ -19946,7 +20190,7 @@ </parameter> </method> <method name="setIcon" return="void" return="android.app.ActionBar.Tab" abstract="true" native="false" synchronized="false" Loading @@ -19959,7 +20203,7 @@ </parameter> </method> <method name="setTabListener" return="void" return="android.app.ActionBar.Tab" abstract="true" native="false" synchronized="false" Loading @@ -19972,7 +20216,7 @@ </parameter> </method> <method name="setTag" return="void" return="android.app.ActionBar.Tab" abstract="true" native="false" synchronized="false" Loading @@ -19985,7 +20229,7 @@ </parameter> </method> <method name="setText" return="void" return="android.app.ActionBar.Tab" abstract="true" native="false" synchronized="false" Loading Loading @@ -245127,7 +245371,7 @@ deprecated="not deprecated" visibility="public" > <parameter name="arg0" type="T"> <parameter name="t" type="T"> </parameter> </method> </interface> core/java/android/app/ActionBar.java +236 −26 File changed.Preview size limit exceeded, changes collapsed. Show changes core/java/com/android/internal/app/ActionBarImpl.java +77 −24 Original line number Diff line number Diff line Loading @@ -53,9 +53,6 @@ public class ActionBarImpl extends ActionBar { private static final int NORMAL_VIEW = 0; private static final int CONTEXT_VIEW = 1; private static final int TAB_SWITCH_SHOW_HIDE = 0; private static final int TAB_SWITCH_ADD_REMOVE = 1; private Context mContext; private Activity mActivity; private Dialog mDialog; Loading @@ -67,9 +64,7 @@ public class ActionBarImpl extends ActionBar { private ArrayList<TabImpl> mTabs = new ArrayList<TabImpl>(); private int mTabContainerViewId = android.R.id.content; private TabImpl mSelectedTab; private int mTabSwitchMode = TAB_SWITCH_ADD_REMOVE; private ActionMode mActionMode; Loading Loading @@ -133,7 +128,9 @@ public class ActionBarImpl extends ActionBar { public void setCustomNavigationMode(View view) { cleanupTabs(); mActionView.setCustomNavigationView(view); setCustomView(view); setDisplayOptions(DISPLAY_SHOW_CUSTOM, DISPLAY_SHOW_CUSTOM | DISPLAY_SHOW_TITLE); mActionView.setNavigationMode(NAVIGATION_MODE_STANDARD); mActionView.setCallback(null); } Loading @@ -144,16 +141,17 @@ public class ActionBarImpl extends ActionBar { public void setDropdownNavigationMode(SpinnerAdapter adapter, NavigationCallback callback, int defaultSelectedPosition) { cleanupTabs(); mActionView.setNavigationMode(NAVIGATION_MODE_DROPDOWN_LIST); mActionView.setDropdownAdapter(adapter); setDisplayOptions(0, DISPLAY_SHOW_CUSTOM | DISPLAY_SHOW_TITLE); mActionView.setNavigationMode(NAVIGATION_MODE_LIST); setListNavigationCallbacks(adapter, callback); if (defaultSelectedPosition >= 0) { mActionView.setDropdownSelectedPosition(defaultSelectedPosition); } mActionView.setCallback(callback); } public void setStandardNavigationMode() { cleanupTabs(); setDisplayOptions(DISPLAY_SHOW_TITLE, DISPLAY_SHOW_TITLE | DISPLAY_SHOW_CUSTOM); mActionView.setNavigationMode(NAVIGATION_MODE_STANDARD); mActionView.setCallback(null); } Loading @@ -163,24 +161,21 @@ public class ActionBarImpl extends ActionBar { case NAVIGATION_MODE_TABS: selectTab(mTabs.get(position)); break; case NAVIGATION_MODE_DROPDOWN_LIST: case NAVIGATION_MODE_LIST: mActionView.setDropdownSelectedPosition(position); break; default: throw new IllegalStateException( "setSelectedNavigationItem not valid for current navigation mode"); "setSelectedNavigationIndex not valid for current navigation mode"); } } public int getSelectedNavigationItem() { switch (mActionView.getNavigationMode()) { case NAVIGATION_MODE_TABS: return mSelectedTab.getPosition(); case NAVIGATION_MODE_DROPDOWN_LIST: return mActionView.getDropdownSelectedPosition(); default: return -1; return getSelectedNavigationIndex(); } public void removeAllTabs() { cleanupTabs(); } private void cleanupTabs() { Loading Loading @@ -321,6 +316,7 @@ public class ActionBarImpl extends ActionBar { throw new IllegalStateException( "Tab navigation mode cannot be used outside of an Activity"); } setDisplayOptions(0, DISPLAY_SHOW_TITLE | DISPLAY_SHOW_CUSTOM); mActionView.setNavigationMode(NAVIGATION_MODE_TABS); } Loading Loading @@ -510,8 +506,9 @@ public class ActionBarImpl extends ActionBar { } @Override public void setTag(Object tag) { public Tab setTag(Object tag) { mTag = tag; return this; } public ActionBar.TabListener getCallback() { Loading @@ -519,8 +516,9 @@ public class ActionBarImpl extends ActionBar { } @Override public void setTabListener(ActionBar.TabListener callback) { public Tab setTabListener(ActionBar.TabListener callback) { mCallback = callback; return this; } @Override Loading @@ -529,8 +527,9 @@ public class ActionBarImpl extends ActionBar { } @Override public void setCustomView(View view) { public Tab setCustomView(View view) { mCustomView = view; return this; } @Override Loading @@ -553,13 +552,15 @@ public class ActionBarImpl extends ActionBar { } @Override public void setIcon(Drawable icon) { public Tab setIcon(Drawable icon) { mIcon = icon; return this; } @Override public void setText(CharSequence text) { public Tab setText(CharSequence text) { mText = text; return this; } @Override Loading @@ -567,4 +568,56 @@ public class ActionBarImpl extends ActionBar { selectTab(this); } } @Override public void setCustomView(View view) { mActionView.setCustomNavigationView(view); } @Override public void setCustomView(View view, LayoutParams layoutParams) { view.setLayoutParams(layoutParams); mActionView.setCustomNavigationView(view); } @Override public void setListNavigationCallbacks(SpinnerAdapter adapter, NavigationCallback callback) { mActionView.setDropdownAdapter(adapter); mActionView.setCallback(callback); } @Override public int getSelectedNavigationIndex() { switch (mActionView.getNavigationMode()) { case NAVIGATION_MODE_TABS: return mSelectedTab.getPosition(); case NAVIGATION_MODE_LIST: return mActionView.getDropdownSelectedPosition(); default: return -1; } } @Override public int getNavigationItemCount() { switch (mActionView.getNavigationMode()) { case NAVIGATION_MODE_TABS: return mTabs.size(); case NAVIGATION_MODE_LIST: SpinnerAdapter adapter = mActionView.getDropdownAdapter(); return adapter != null ? adapter.getCount() : 0; default: return 0; } } @Override public void setNavigationMode(int mode) { mActionView.setNavigationMode(mode); } @Override public Tab getTabAt(int index) { return mTabs.get(index); } } core/java/com/android/internal/view/menu/ActionMenuView.java +5 −1 Original line number Diff line number Diff line Loading @@ -24,10 +24,10 @@ import android.util.AttributeSet; import android.view.Gravity; import android.view.View; import android.view.ViewGroup; import android.view.ViewParent; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.LinearLayout.LayoutParams; import java.util.ArrayList; Loading Loading @@ -169,6 +169,10 @@ public class ActionMenuView extends LinearLayout implements MenuBuilder.ItemInvo final MenuItemImpl itemData = itemsToShow.get(i); final View actionView = itemData.getActionView(); if (actionView != null) { final ViewParent parent = actionView.getParent(); if (parent instanceof ViewGroup) { ((ViewGroup) parent).removeView(actionView); } addView(actionView, makeActionViewLayoutParams()); } else { needsDivider = addItemView(i == 0 || !needsDivider, Loading core/java/com/android/internal/widget/ActionBarContextView.java +0 −3 Original line number Diff line number Diff line Loading @@ -26,9 +26,6 @@ import android.view.ActionMode; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.ButtonGroup; import android.widget.ImageButton; import android.widget.LinearLayout; import android.widget.TextView; Loading Loading
api/current.xml +264 −20 Original line number Diff line number Diff line Loading @@ -1894,7 +1894,7 @@ type="int" transient="false" volatile="false" value="16843549" value="16843550" static="true" final="true" deprecated="not deprecated" Loading @@ -1905,7 +1905,7 @@ type="int" transient="false" volatile="false" value="16843548" value="16843549" static="true" final="true" deprecated="not deprecated" Loading @@ -1916,7 +1916,7 @@ type="int" transient="false" volatile="false" value="16843550" value="16843551" static="true" final="true" deprecated="not deprecated" Loading Loading @@ -4717,6 +4717,17 @@ visibility="public" > </field> <field name="homeAsUpIndicator" type="int" transient="false" volatile="false" value="16843548" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="horizontalDivider" type="int" transient="false" Loading Loading @@ -9286,7 +9297,7 @@ type="int" transient="false" volatile="false" value="16843552" value="16843553" static="true" final="true" deprecated="not deprecated" Loading @@ -9297,7 +9308,7 @@ type="int" transient="false" volatile="false" value="16843551" value="16843552" static="true" final="true" deprecated="not deprecated" Loading Loading @@ -19449,6 +19460,17 @@ visibility="public" > </method> <method name="getNavigationItemCount" return="int" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getNavigationMode" return="int" abstract="true" Loading @@ -19460,7 +19482,7 @@ visibility="public" > </method> <method name="getSelectedNavigationItem" <method name="getSelectedNavigationIndex" return="int" abstract="true" native="false" Loading @@ -19471,6 +19493,17 @@ visibility="public" > </method> <method name="getSelectedNavigationItem" return="int" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="deprecated" visibility="public" > </method> <method name="getSelectedTab" return="android.app.ActionBar.Tab" abstract="true" Loading @@ -19493,6 +19526,19 @@ visibility="public" > </method> <method name="getTabAt" return="android.app.ActionBar.Tab" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="index" type="int"> </parameter> </method> <method name="getTitle" return="java.lang.CharSequence" abstract="true" Loading Loading @@ -19537,6 +19583,17 @@ visibility="public" > </method> <method name="removeAllTabs" return="void" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="removeTab" return="void" abstract="true" Loading Loading @@ -19590,6 +19647,32 @@ </parameter> </method> <method name="setCustomNavigationMode" return="void" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="deprecated" visibility="public" > <parameter name="view" type="android.view.View"> </parameter> </method> <method name="setCustomView" return="void" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="view" type="android.view.View"> </parameter> </method> <method name="setCustomView" return="void" abstract="true" native="false" Loading @@ -19601,6 +19684,8 @@ > <parameter name="view" type="android.view.View"> </parameter> <parameter name="layoutParams" type="android.app.ActionBar.LayoutParams"> </parameter> </method> <method name="setDisplayOptions" return="void" Loading Loading @@ -19637,7 +19722,7 @@ synchronized="false" static="false" final="false" deprecated="not deprecated" deprecated="deprecated" visibility="public" > <parameter name="adapter" type="android.widget.SpinnerAdapter"> Loading @@ -19652,7 +19737,7 @@ synchronized="false" static="false" final="false" deprecated="not deprecated" deprecated="deprecated" visibility="public" > <parameter name="adapter" type="android.widget.SpinnerAdapter"> Loading @@ -19662,6 +19747,34 @@ <parameter name="defaultSelectedPosition" type="int"> </parameter> </method> <method name="setListNavigationCallbacks" return="void" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="adapter" type="android.widget.SpinnerAdapter"> </parameter> <parameter name="callback" type="android.app.ActionBar.NavigationCallback"> </parameter> </method> <method name="setNavigationMode" return="void" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="mode" type="int"> </parameter> </method> <method name="setSelectedNavigationItem" return="void" abstract="true" Loading @@ -19682,7 +19795,7 @@ synchronized="false" static="false" final="false" deprecated="not deprecated" deprecated="deprecated" visibility="public" > </method> Loading Loading @@ -19719,7 +19832,7 @@ synchronized="false" static="false" final="false" deprecated="not deprecated" deprecated="deprecated" visibility="public" > </method> Loading Loading @@ -19761,6 +19874,39 @@ > </method> <field name="DISPLAY_HIDE_HOME" type="int" transient="false" volatile="false" value="4096" static="true" final="true" deprecated="deprecated" visibility="public" > </field> <field name="DISPLAY_HOME_AS_UP" type="int" transient="false" volatile="false" value="4" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="DISPLAY_SHOW_CUSTOM" type="int" transient="false" volatile="false" value="16" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="DISPLAY_SHOW_HOME" type="int" transient="false" volatile="false" Loading @@ -19771,22 +19917,22 @@ visibility="public" > </field> <field name="DISPLAY_USE_LOGO" <field name="DISPLAY_SHOW_TITLE" type="int" transient="false" volatile="false" value="1" value="8" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="NAVIGATION_MODE_CUSTOM" <field name="DISPLAY_USE_LOGO" type="int" transient="false" volatile="false" value="3" value="1" static="true" final="true" deprecated="not deprecated" Loading @@ -19794,6 +19940,17 @@ > </field> <field name="NAVIGATION_MODE_DROPDOWN_LIST" type="int" transient="false" volatile="false" value="1" static="true" final="true" deprecated="deprecated" visibility="public" > </field> <field name="NAVIGATION_MODE_LIST" type="int" transient="false" volatile="false" Loading Loading @@ -19827,6 +19984,93 @@ > </field> </class> <class name="ActionBar.LayoutParams" extends="android.view.ViewGroup.MarginLayoutParams" abstract="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <constructor name="ActionBar.LayoutParams" type="android.app.ActionBar.LayoutParams" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="c" type="android.content.Context"> </parameter> <parameter name="attrs" type="android.util.AttributeSet"> </parameter> </constructor> <constructor name="ActionBar.LayoutParams" type="android.app.ActionBar.LayoutParams" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="width" type="int"> </parameter> <parameter name="height" type="int"> </parameter> </constructor> <constructor name="ActionBar.LayoutParams" type="android.app.ActionBar.LayoutParams" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="width" type="int"> </parameter> <parameter name="height" type="int"> </parameter> <parameter name="gravity" type="int"> </parameter> </constructor> <constructor name="ActionBar.LayoutParams" type="android.app.ActionBar.LayoutParams" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="gravity" type="int"> </parameter> </constructor> <constructor name="ActionBar.LayoutParams" type="android.app.ActionBar.LayoutParams" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="source" type="android.app.ActionBar.LayoutParams"> </parameter> </constructor> <constructor name="ActionBar.LayoutParams" type="android.app.ActionBar.LayoutParams" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="source" type="android.view.ViewGroup.LayoutParams"> </parameter> </constructor> <field name="gravity" type="int" transient="false" volatile="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </field> </class> <interface name="ActionBar.NavigationCallback" abstract="true" static="true" Loading Loading @@ -19933,7 +20177,7 @@ > </method> <method name="setCustomView" return="void" return="android.app.ActionBar.Tab" abstract="true" native="false" synchronized="false" Loading @@ -19946,7 +20190,7 @@ </parameter> </method> <method name="setIcon" return="void" return="android.app.ActionBar.Tab" abstract="true" native="false" synchronized="false" Loading @@ -19959,7 +20203,7 @@ </parameter> </method> <method name="setTabListener" return="void" return="android.app.ActionBar.Tab" abstract="true" native="false" synchronized="false" Loading @@ -19972,7 +20216,7 @@ </parameter> </method> <method name="setTag" return="void" return="android.app.ActionBar.Tab" abstract="true" native="false" synchronized="false" Loading @@ -19985,7 +20229,7 @@ </parameter> </method> <method name="setText" return="void" return="android.app.ActionBar.Tab" abstract="true" native="false" synchronized="false" Loading Loading @@ -245127,7 +245371,7 @@ deprecated="not deprecated" visibility="public" > <parameter name="arg0" type="T"> <parameter name="t" type="T"> </parameter> </method> </interface>
core/java/android/app/ActionBar.java +236 −26 File changed.Preview size limit exceeded, changes collapsed. Show changes
core/java/com/android/internal/app/ActionBarImpl.java +77 −24 Original line number Diff line number Diff line Loading @@ -53,9 +53,6 @@ public class ActionBarImpl extends ActionBar { private static final int NORMAL_VIEW = 0; private static final int CONTEXT_VIEW = 1; private static final int TAB_SWITCH_SHOW_HIDE = 0; private static final int TAB_SWITCH_ADD_REMOVE = 1; private Context mContext; private Activity mActivity; private Dialog mDialog; Loading @@ -67,9 +64,7 @@ public class ActionBarImpl extends ActionBar { private ArrayList<TabImpl> mTabs = new ArrayList<TabImpl>(); private int mTabContainerViewId = android.R.id.content; private TabImpl mSelectedTab; private int mTabSwitchMode = TAB_SWITCH_ADD_REMOVE; private ActionMode mActionMode; Loading Loading @@ -133,7 +128,9 @@ public class ActionBarImpl extends ActionBar { public void setCustomNavigationMode(View view) { cleanupTabs(); mActionView.setCustomNavigationView(view); setCustomView(view); setDisplayOptions(DISPLAY_SHOW_CUSTOM, DISPLAY_SHOW_CUSTOM | DISPLAY_SHOW_TITLE); mActionView.setNavigationMode(NAVIGATION_MODE_STANDARD); mActionView.setCallback(null); } Loading @@ -144,16 +141,17 @@ public class ActionBarImpl extends ActionBar { public void setDropdownNavigationMode(SpinnerAdapter adapter, NavigationCallback callback, int defaultSelectedPosition) { cleanupTabs(); mActionView.setNavigationMode(NAVIGATION_MODE_DROPDOWN_LIST); mActionView.setDropdownAdapter(adapter); setDisplayOptions(0, DISPLAY_SHOW_CUSTOM | DISPLAY_SHOW_TITLE); mActionView.setNavigationMode(NAVIGATION_MODE_LIST); setListNavigationCallbacks(adapter, callback); if (defaultSelectedPosition >= 0) { mActionView.setDropdownSelectedPosition(defaultSelectedPosition); } mActionView.setCallback(callback); } public void setStandardNavigationMode() { cleanupTabs(); setDisplayOptions(DISPLAY_SHOW_TITLE, DISPLAY_SHOW_TITLE | DISPLAY_SHOW_CUSTOM); mActionView.setNavigationMode(NAVIGATION_MODE_STANDARD); mActionView.setCallback(null); } Loading @@ -163,24 +161,21 @@ public class ActionBarImpl extends ActionBar { case NAVIGATION_MODE_TABS: selectTab(mTabs.get(position)); break; case NAVIGATION_MODE_DROPDOWN_LIST: case NAVIGATION_MODE_LIST: mActionView.setDropdownSelectedPosition(position); break; default: throw new IllegalStateException( "setSelectedNavigationItem not valid for current navigation mode"); "setSelectedNavigationIndex not valid for current navigation mode"); } } public int getSelectedNavigationItem() { switch (mActionView.getNavigationMode()) { case NAVIGATION_MODE_TABS: return mSelectedTab.getPosition(); case NAVIGATION_MODE_DROPDOWN_LIST: return mActionView.getDropdownSelectedPosition(); default: return -1; return getSelectedNavigationIndex(); } public void removeAllTabs() { cleanupTabs(); } private void cleanupTabs() { Loading Loading @@ -321,6 +316,7 @@ public class ActionBarImpl extends ActionBar { throw new IllegalStateException( "Tab navigation mode cannot be used outside of an Activity"); } setDisplayOptions(0, DISPLAY_SHOW_TITLE | DISPLAY_SHOW_CUSTOM); mActionView.setNavigationMode(NAVIGATION_MODE_TABS); } Loading Loading @@ -510,8 +506,9 @@ public class ActionBarImpl extends ActionBar { } @Override public void setTag(Object tag) { public Tab setTag(Object tag) { mTag = tag; return this; } public ActionBar.TabListener getCallback() { Loading @@ -519,8 +516,9 @@ public class ActionBarImpl extends ActionBar { } @Override public void setTabListener(ActionBar.TabListener callback) { public Tab setTabListener(ActionBar.TabListener callback) { mCallback = callback; return this; } @Override Loading @@ -529,8 +527,9 @@ public class ActionBarImpl extends ActionBar { } @Override public void setCustomView(View view) { public Tab setCustomView(View view) { mCustomView = view; return this; } @Override Loading @@ -553,13 +552,15 @@ public class ActionBarImpl extends ActionBar { } @Override public void setIcon(Drawable icon) { public Tab setIcon(Drawable icon) { mIcon = icon; return this; } @Override public void setText(CharSequence text) { public Tab setText(CharSequence text) { mText = text; return this; } @Override Loading @@ -567,4 +568,56 @@ public class ActionBarImpl extends ActionBar { selectTab(this); } } @Override public void setCustomView(View view) { mActionView.setCustomNavigationView(view); } @Override public void setCustomView(View view, LayoutParams layoutParams) { view.setLayoutParams(layoutParams); mActionView.setCustomNavigationView(view); } @Override public void setListNavigationCallbacks(SpinnerAdapter adapter, NavigationCallback callback) { mActionView.setDropdownAdapter(adapter); mActionView.setCallback(callback); } @Override public int getSelectedNavigationIndex() { switch (mActionView.getNavigationMode()) { case NAVIGATION_MODE_TABS: return mSelectedTab.getPosition(); case NAVIGATION_MODE_LIST: return mActionView.getDropdownSelectedPosition(); default: return -1; } } @Override public int getNavigationItemCount() { switch (mActionView.getNavigationMode()) { case NAVIGATION_MODE_TABS: return mTabs.size(); case NAVIGATION_MODE_LIST: SpinnerAdapter adapter = mActionView.getDropdownAdapter(); return adapter != null ? adapter.getCount() : 0; default: return 0; } } @Override public void setNavigationMode(int mode) { mActionView.setNavigationMode(mode); } @Override public Tab getTabAt(int index) { return mTabs.get(index); } }
core/java/com/android/internal/view/menu/ActionMenuView.java +5 −1 Original line number Diff line number Diff line Loading @@ -24,10 +24,10 @@ import android.util.AttributeSet; import android.view.Gravity; import android.view.View; import android.view.ViewGroup; import android.view.ViewParent; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.LinearLayout.LayoutParams; import java.util.ArrayList; Loading Loading @@ -169,6 +169,10 @@ public class ActionMenuView extends LinearLayout implements MenuBuilder.ItemInvo final MenuItemImpl itemData = itemsToShow.get(i); final View actionView = itemData.getActionView(); if (actionView != null) { final ViewParent parent = actionView.getParent(); if (parent instanceof ViewGroup) { ((ViewGroup) parent).removeView(actionView); } addView(actionView, makeActionViewLayoutParams()); } else { needsDivider = addItemView(i == 0 || !needsDivider, Loading
core/java/com/android/internal/widget/ActionBarContextView.java +0 −3 Original line number Diff line number Diff line Loading @@ -26,9 +26,6 @@ import android.view.ActionMode; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.ButtonGroup; import android.widget.ImageButton; import android.widget.LinearLayout; import android.widget.TextView; Loading