Loading api/current.xml +68 −2 Original line number Diff line number Diff line Loading @@ -10580,6 +10580,17 @@ visibility="public" > </field> <field name="windowActionBarOverlay" type="int" transient="false" volatile="false" value="16843558" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="windowActionBarStyle" type="int" transient="false" Loading Loading @@ -20936,6 +20947,17 @@ visibility="public" > </method> <method name="getHeight" 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 Loading @@ -20980,6 +21002,17 @@ visibility="public" > </method> <method name="hide" return="void" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="insertTab" return="void" abstract="true" Loading @@ -20995,6 +21028,17 @@ <parameter name="position" type="int"> </parameter> </method> <method name="isShowing" return="boolean" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="newTab" return="android.app.ActionBar.Tab" abstract="true" Loading Loading @@ -21287,6 +21331,17 @@ <parameter name="resId" type="int"> </parameter> </method> <method name="show" return="void" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <field name="DISPLAY_HIDE_HOME" type="int" transient="false" Loading Loading @@ -201148,7 +201203,7 @@ visibility="public" > </field> <field name="FEATURE_ACTION_MODE_OVERLAY" <field name="FEATURE_ACTION_BAR_OVERLAY" type="int" transient="false" volatile="false" Loading @@ -201159,6 +201214,17 @@ visibility="public" > </field> <field name="FEATURE_ACTION_MODE_OVERLAY" type="int" transient="false" volatile="false" value="10" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="FEATURE_CONTEXT_MENU" type="int" transient="false" Loading @@ -201185,7 +201251,7 @@ type="int" transient="false" volatile="false" value="10" value="11" static="true" final="true" deprecated="not deprecated" core/java/android/app/ActionBar.java +29 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.app; import android.graphics.drawable.Drawable; import android.view.View; import android.view.Window; import android.widget.SpinnerAdapter; /** Loading Loading @@ -382,6 +383,34 @@ public abstract class ActionBar { */ public abstract void selectTab(Tab tab); /** * Retrieve the current height of the ActionBar. * * @return The ActionBar's height */ public abstract int getHeight(); /** * Show the ActionBar if it is not currently showing. * If the window hosting the ActionBar does not have the feature * {@link Window#FEATURE_ACTION_BAR_OVERLAY} it will resize application * content to fit the new space available. */ public abstract void show(); /** * Hide the ActionBar if it is not currently showing. * If the window hosting the ActionBar does not have the feature * {@link Window#FEATURE_ACTION_BAR_OVERLAY} it will resize application * content to fit the new space available. */ public abstract void hide(); /** * @return <code>true</code> if the ActionBar is showing, <code>false</code> otherwise. */ public abstract boolean isShowing(); /** * Callback interface for ActionBar navigation events. */ Loading core/java/android/view/Window.java +12 −2 Original line number Diff line number Diff line Loading @@ -63,15 +63,25 @@ public abstract class Window { * for an on-screen menu button on some devices. */ public static final int FEATURE_ACTION_BAR = 8; /** * Flag for requesting an Action Bar that overlays window content. * Normally an Action Bar will sit in the space above window content, but if this * feature is requested along with {@link #FEATURE_ACTION_BAR} it will be layered over * the window content itself. This is useful if you would like your app to have more control * over how the Action Bar is displayed, such as letting application content scroll beneath * an Action Bar with a transparent background or otherwise displaying a transparent/translucent * Action Bar over application content. */ public static final int FEATURE_ACTION_BAR_OVERLAY = 9; /** * Flag for specifying the behavior of action modes when an Action Bar is not present. * If overlay is enabled, the action mode UI will be allowed to cover existing window content. */ public static final int FEATURE_ACTION_MODE_OVERLAY = 9; public static final int FEATURE_ACTION_MODE_OVERLAY = 10; /** * Flag for requesting this window to be hardware accelerated, if possible. */ public static final int FEATURE_HARDWARE_ACCELERATED = 10; public static final int FEATURE_HARDWARE_ACCELERATED = 11; /** Flag for setting the progress bar's visibility to VISIBLE */ public static final int PROGRESS_VISIBILITY_ON = -1; /** Flag for setting the progress bar's visibility to GONE */ Loading core/java/com/android/internal/app/ActionBarImpl.java +21 −0 Original line number Diff line number Diff line Loading @@ -397,6 +397,27 @@ public class ActionBarImpl extends ActionBar { trans.commit(); } @Override public int getHeight() { return mActionView.getHeight(); } @Override public void show() { // TODO animate! mAnimatorView.setVisibility(View.VISIBLE); } @Override public void hide() { // TODO animate! mAnimatorView.setVisibility(View.GONE); } public boolean isShowing() { return mAnimatorView.getVisibility() == View.VISIBLE; } /** * @hide */ Loading core/java/com/android/internal/view/menu/ActionMenuView.java +3 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.content.res.Configuration; import android.content.res.Resources; import android.content.res.TypedArray; import android.util.AttributeSet; import android.view.Gravity; import android.view.ViewGroup; import android.widget.ImageButton; import android.widget.LinearLayout; Loading Loading @@ -82,6 +83,7 @@ public class ActionMenuView extends LinearLayout implements MenuBuilder.ItemInvo if (p instanceof LayoutParams) { LayoutParams lp = (LayoutParams) p; return lp.leftMargin == mItemMargin && lp.rightMargin == mItemMargin && lp.gravity == Gravity.CENTER_VERTICAL && lp.width == LayoutParams.WRAP_CONTENT && lp.height == LayoutParams.WRAP_CONTENT; } return false; Loading @@ -93,6 +95,7 @@ public class ActionMenuView extends LinearLayout implements MenuBuilder.ItemInvo LayoutParams.WRAP_CONTENT); params.leftMargin = mItemMargin; params.rightMargin = mItemMargin; params.gravity = Gravity.CENTER_VERTICAL; return params; } Loading Loading
api/current.xml +68 −2 Original line number Diff line number Diff line Loading @@ -10580,6 +10580,17 @@ visibility="public" > </field> <field name="windowActionBarOverlay" type="int" transient="false" volatile="false" value="16843558" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="windowActionBarStyle" type="int" transient="false" Loading Loading @@ -20936,6 +20947,17 @@ visibility="public" > </method> <method name="getHeight" 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 Loading @@ -20980,6 +21002,17 @@ visibility="public" > </method> <method name="hide" return="void" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="insertTab" return="void" abstract="true" Loading @@ -20995,6 +21028,17 @@ <parameter name="position" type="int"> </parameter> </method> <method name="isShowing" return="boolean" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="newTab" return="android.app.ActionBar.Tab" abstract="true" Loading Loading @@ -21287,6 +21331,17 @@ <parameter name="resId" type="int"> </parameter> </method> <method name="show" return="void" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <field name="DISPLAY_HIDE_HOME" type="int" transient="false" Loading Loading @@ -201148,7 +201203,7 @@ visibility="public" > </field> <field name="FEATURE_ACTION_MODE_OVERLAY" <field name="FEATURE_ACTION_BAR_OVERLAY" type="int" transient="false" volatile="false" Loading @@ -201159,6 +201214,17 @@ visibility="public" > </field> <field name="FEATURE_ACTION_MODE_OVERLAY" type="int" transient="false" volatile="false" value="10" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="FEATURE_CONTEXT_MENU" type="int" transient="false" Loading @@ -201185,7 +201251,7 @@ type="int" transient="false" volatile="false" value="10" value="11" static="true" final="true" deprecated="not deprecated"
core/java/android/app/ActionBar.java +29 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.app; import android.graphics.drawable.Drawable; import android.view.View; import android.view.Window; import android.widget.SpinnerAdapter; /** Loading Loading @@ -382,6 +383,34 @@ public abstract class ActionBar { */ public abstract void selectTab(Tab tab); /** * Retrieve the current height of the ActionBar. * * @return The ActionBar's height */ public abstract int getHeight(); /** * Show the ActionBar if it is not currently showing. * If the window hosting the ActionBar does not have the feature * {@link Window#FEATURE_ACTION_BAR_OVERLAY} it will resize application * content to fit the new space available. */ public abstract void show(); /** * Hide the ActionBar if it is not currently showing. * If the window hosting the ActionBar does not have the feature * {@link Window#FEATURE_ACTION_BAR_OVERLAY} it will resize application * content to fit the new space available. */ public abstract void hide(); /** * @return <code>true</code> if the ActionBar is showing, <code>false</code> otherwise. */ public abstract boolean isShowing(); /** * Callback interface for ActionBar navigation events. */ Loading
core/java/android/view/Window.java +12 −2 Original line number Diff line number Diff line Loading @@ -63,15 +63,25 @@ public abstract class Window { * for an on-screen menu button on some devices. */ public static final int FEATURE_ACTION_BAR = 8; /** * Flag for requesting an Action Bar that overlays window content. * Normally an Action Bar will sit in the space above window content, but if this * feature is requested along with {@link #FEATURE_ACTION_BAR} it will be layered over * the window content itself. This is useful if you would like your app to have more control * over how the Action Bar is displayed, such as letting application content scroll beneath * an Action Bar with a transparent background or otherwise displaying a transparent/translucent * Action Bar over application content. */ public static final int FEATURE_ACTION_BAR_OVERLAY = 9; /** * Flag for specifying the behavior of action modes when an Action Bar is not present. * If overlay is enabled, the action mode UI will be allowed to cover existing window content. */ public static final int FEATURE_ACTION_MODE_OVERLAY = 9; public static final int FEATURE_ACTION_MODE_OVERLAY = 10; /** * Flag for requesting this window to be hardware accelerated, if possible. */ public static final int FEATURE_HARDWARE_ACCELERATED = 10; public static final int FEATURE_HARDWARE_ACCELERATED = 11; /** Flag for setting the progress bar's visibility to VISIBLE */ public static final int PROGRESS_VISIBILITY_ON = -1; /** Flag for setting the progress bar's visibility to GONE */ Loading
core/java/com/android/internal/app/ActionBarImpl.java +21 −0 Original line number Diff line number Diff line Loading @@ -397,6 +397,27 @@ public class ActionBarImpl extends ActionBar { trans.commit(); } @Override public int getHeight() { return mActionView.getHeight(); } @Override public void show() { // TODO animate! mAnimatorView.setVisibility(View.VISIBLE); } @Override public void hide() { // TODO animate! mAnimatorView.setVisibility(View.GONE); } public boolean isShowing() { return mAnimatorView.getVisibility() == View.VISIBLE; } /** * @hide */ Loading
core/java/com/android/internal/view/menu/ActionMenuView.java +3 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.content.res.Configuration; import android.content.res.Resources; import android.content.res.TypedArray; import android.util.AttributeSet; import android.view.Gravity; import android.view.ViewGroup; import android.widget.ImageButton; import android.widget.LinearLayout; Loading Loading @@ -82,6 +83,7 @@ public class ActionMenuView extends LinearLayout implements MenuBuilder.ItemInvo if (p instanceof LayoutParams) { LayoutParams lp = (LayoutParams) p; return lp.leftMargin == mItemMargin && lp.rightMargin == mItemMargin && lp.gravity == Gravity.CENTER_VERTICAL && lp.width == LayoutParams.WRAP_CONTENT && lp.height == LayoutParams.WRAP_CONTENT; } return false; Loading @@ -93,6 +95,7 @@ public class ActionMenuView extends LinearLayout implements MenuBuilder.ItemInvo LayoutParams.WRAP_CONTENT); params.leftMargin = mItemMargin; params.rightMargin = mItemMargin; params.gravity = Gravity.CENTER_VERTICAL; return params; } Loading