Loading core/java/android/view/View.java +47 −6 Original line number Diff line number Diff line Loading @@ -14414,9 +14414,48 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal } /** * Request that the visibility of the status bar be changed. * @param visibility Bitwise-or of flags {@link #SYSTEM_UI_FLAG_LOW_PROFILE} or * {@link #SYSTEM_UI_FLAG_HIDE_NAVIGATION}. * Request that the visibility of the status bar or other screen/window * decorations be changed. * * <p>This method is used to put the over device UI into temporary modes * where the user's attention is focused more on the application content, * by dimming or hiding surrounding system affordances. This is typically * used in conjunction with {@link Window#FEATURE_ACTION_BAR_OVERLAY * Window.FEATURE_ACTION_BAR_OVERLAY}, allowing the applications content * to be placed behind the action bar (and with these flags other system * affordances) so that smooth transitions between hiding and showing them * can be done. * * <p>Two representative examples of the use of system UI visibility is * implementing a content browsing application (like a magazine reader) * and a video playing application. * * <p>The first code shows a typical implementation of a View in a content * browsing application. In this implementation, the application goes * into a content-oriented mode by hiding the status bar and action bar, * and putting the navigation elements into lights out mode. The user can * then interact with content while in this mode. Such an application should * provide an easy way for the user to toggle out of the mode (such as to * check information in the status bar or access notifications). In the * implementation here, this is done simply by tapping on the content. * * {@sample development/samples/ApiDemos/src/com/example/android/apis/view/ContentBrowserActivity.java * content} * * <p>This second code sample shows a typical implementation of a View * in a video playing application. In this situation, while the video is * playing the application would like to go into a complete full-screen mode, * to use as much of the display as possible for the video. When in this state * the user can not interact with the application; the system intercepts * touching on the screen to pop the UI out of full screen mode. * * {@sample development/samples/ApiDemos/src/com/example/android/apis/view/VideoPlayerActivity.java * content} * * @param visibility Bitwise-or of flags {@link #SYSTEM_UI_FLAG_LOW_PROFILE}, * {@link #SYSTEM_UI_FLAG_HIDE_NAVIGATION}, {@link #SYSTEM_UI_FLAG_FULLSCREEN}, * {@link #SYSTEM_UI_FLAG_LAYOUT_STABLE}, {@link #SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION}, * and {@link #SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN}. */ public void setSystemUiVisibility(int visibility) { if (visibility != mSystemUiVisibility) { Loading @@ -14428,9 +14467,11 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal } /** * Returns the status bar visibility that this view has requested. * @return Bitwise-or of flags {@link #SYSTEM_UI_FLAG_LOW_PROFILE} or * {@link #SYSTEM_UI_FLAG_HIDE_NAVIGATION}. * Returns the last {@link #setSystemUiVisibility(int) that this view has requested. * @return Bitwise-or of flags {@link #SYSTEM_UI_FLAG_LOW_PROFILE}, * {@link #SYSTEM_UI_FLAG_HIDE_NAVIGATION}, {@link #SYSTEM_UI_FLAG_FULLSCREEN}, * {@link #SYSTEM_UI_FLAG_LAYOUT_STABLE}, {@link #SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION}, * and {@link #SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN}. */ public int getSystemUiVisibility() { return mSystemUiVisibility; core/java/com/android/internal/widget/ActionBarOverlayLayout.java +0 −3 Original line number Diff line number Diff line Loading @@ -18,14 +18,11 @@ package com.android.internal.widget; import com.android.internal.app.ActionBarImpl; import android.animation.LayoutTransition; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Rect; import android.util.AttributeSet; import android.util.Log; import android.view.View; import android.view.ViewTreeObserver; import android.widget.FrameLayout; /** Loading packages/SystemUI/res/layout/status_bar.xml +1 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ android:orientation="vertical" android:focusable="true" android:descendantFocusability="afterDescendants" android:fitsSystemWindows="true" > <LinearLayout android:id="@+id/icons" Loading policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +8 −4 Original line number Diff line number Diff line Loading @@ -2230,10 +2230,14 @@ public class PhoneWindowManager implements WindowManagerPolicy { // decide where the status bar goes ahead of time if (mStatusBar != null) { // apply any navigation bar insets pf.left = df.left = vf.left = mDockLeft; pf.top = df.top = vf.top = mDockTop; pf.right = df.right = vf.right = mDockRight; pf.bottom = df.bottom = vf.bottom = mDockBottom; pf.left = df.left = mUnrestrictedScreenLeft; pf.top = df.top = mUnrestrictedScreenTop; pf.right = df.right = mUnrestrictedScreenWidth - mUnrestrictedScreenLeft; pf.bottom = df.bottom = mUnrestrictedScreenHeight - mUnrestrictedScreenTop; vf.left = mStableLeft; vf.top = mStableTop; vf.right = mStableRight; vf.bottom = mStableBottom; mStatusBar.computeFrameLw(pf, df, vf, vf); final Rect r = mStatusBar.getFrameLw(); Loading Loading
core/java/android/view/View.java +47 −6 Original line number Diff line number Diff line Loading @@ -14414,9 +14414,48 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal } /** * Request that the visibility of the status bar be changed. * @param visibility Bitwise-or of flags {@link #SYSTEM_UI_FLAG_LOW_PROFILE} or * {@link #SYSTEM_UI_FLAG_HIDE_NAVIGATION}. * Request that the visibility of the status bar or other screen/window * decorations be changed. * * <p>This method is used to put the over device UI into temporary modes * where the user's attention is focused more on the application content, * by dimming or hiding surrounding system affordances. This is typically * used in conjunction with {@link Window#FEATURE_ACTION_BAR_OVERLAY * Window.FEATURE_ACTION_BAR_OVERLAY}, allowing the applications content * to be placed behind the action bar (and with these flags other system * affordances) so that smooth transitions between hiding and showing them * can be done. * * <p>Two representative examples of the use of system UI visibility is * implementing a content browsing application (like a magazine reader) * and a video playing application. * * <p>The first code shows a typical implementation of a View in a content * browsing application. In this implementation, the application goes * into a content-oriented mode by hiding the status bar and action bar, * and putting the navigation elements into lights out mode. The user can * then interact with content while in this mode. Such an application should * provide an easy way for the user to toggle out of the mode (such as to * check information in the status bar or access notifications). In the * implementation here, this is done simply by tapping on the content. * * {@sample development/samples/ApiDemos/src/com/example/android/apis/view/ContentBrowserActivity.java * content} * * <p>This second code sample shows a typical implementation of a View * in a video playing application. In this situation, while the video is * playing the application would like to go into a complete full-screen mode, * to use as much of the display as possible for the video. When in this state * the user can not interact with the application; the system intercepts * touching on the screen to pop the UI out of full screen mode. * * {@sample development/samples/ApiDemos/src/com/example/android/apis/view/VideoPlayerActivity.java * content} * * @param visibility Bitwise-or of flags {@link #SYSTEM_UI_FLAG_LOW_PROFILE}, * {@link #SYSTEM_UI_FLAG_HIDE_NAVIGATION}, {@link #SYSTEM_UI_FLAG_FULLSCREEN}, * {@link #SYSTEM_UI_FLAG_LAYOUT_STABLE}, {@link #SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION}, * and {@link #SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN}. */ public void setSystemUiVisibility(int visibility) { if (visibility != mSystemUiVisibility) { Loading @@ -14428,9 +14467,11 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal } /** * Returns the status bar visibility that this view has requested. * @return Bitwise-or of flags {@link #SYSTEM_UI_FLAG_LOW_PROFILE} or * {@link #SYSTEM_UI_FLAG_HIDE_NAVIGATION}. * Returns the last {@link #setSystemUiVisibility(int) that this view has requested. * @return Bitwise-or of flags {@link #SYSTEM_UI_FLAG_LOW_PROFILE}, * {@link #SYSTEM_UI_FLAG_HIDE_NAVIGATION}, {@link #SYSTEM_UI_FLAG_FULLSCREEN}, * {@link #SYSTEM_UI_FLAG_LAYOUT_STABLE}, {@link #SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION}, * and {@link #SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN}. */ public int getSystemUiVisibility() { return mSystemUiVisibility;
core/java/com/android/internal/widget/ActionBarOverlayLayout.java +0 −3 Original line number Diff line number Diff line Loading @@ -18,14 +18,11 @@ package com.android.internal.widget; import com.android.internal.app.ActionBarImpl; import android.animation.LayoutTransition; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Rect; import android.util.AttributeSet; import android.util.Log; import android.view.View; import android.view.ViewTreeObserver; import android.widget.FrameLayout; /** Loading
packages/SystemUI/res/layout/status_bar.xml +1 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ android:orientation="vertical" android:focusable="true" android:descendantFocusability="afterDescendants" android:fitsSystemWindows="true" > <LinearLayout android:id="@+id/icons" Loading
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +8 −4 Original line number Diff line number Diff line Loading @@ -2230,10 +2230,14 @@ public class PhoneWindowManager implements WindowManagerPolicy { // decide where the status bar goes ahead of time if (mStatusBar != null) { // apply any navigation bar insets pf.left = df.left = vf.left = mDockLeft; pf.top = df.top = vf.top = mDockTop; pf.right = df.right = vf.right = mDockRight; pf.bottom = df.bottom = vf.bottom = mDockBottom; pf.left = df.left = mUnrestrictedScreenLeft; pf.top = df.top = mUnrestrictedScreenTop; pf.right = df.right = mUnrestrictedScreenWidth - mUnrestrictedScreenLeft; pf.bottom = df.bottom = mUnrestrictedScreenHeight - mUnrestrictedScreenTop; vf.left = mStableLeft; vf.top = mStableTop; vf.right = mStableRight; vf.bottom = mStableBottom; mStatusBar.computeFrameLw(pf, df, vf, vf); final Rect r = mStatusBar.getFrameLw(); Loading