From ea61ca933160c353f1233a235871f86226b79fcb Mon Sep 17 00:00:00 2001 From: Andrew Solovay Date: Mon, 21 Mar 2016 14:45:52 -0700 Subject: [PATCH] docs: Removed section on overlaying action bar When we replaced the action bar docs with the new app bar docs, we chose not to document the deprecated "overlaying the action bar" functionality. Removing a separate training section that relies on the now-removed material. bug: 26502436 Change-Id: I0fe3715a39d5591be6eecbacbd7f68134ecc9f96 --- docs/html/training/system-ui/status.jd | 33 +------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/docs/html/training/system-ui/status.jd b/docs/html/training/system-ui/status.jd index 9169efc854921..8e5b35638ec88 100755 --- a/docs/html/training/system-ui/status.jd +++ b/docs/html/training/system-ui/status.jd @@ -13,7 +13,6 @@ trainingnavtop=true
  • Hide the Status Bar on Android 4.0 and Lower
  • Hide the Status Bar on Android 4.1 and Higher
  • Make Content Appear Behind the Status Bar
  • -
  • Synchronize the Status Bar with Action Bar Transition
  • @@ -102,7 +101,7 @@ your app:

    super.onCreate(savedInstanceState); // If the Android version is lower than Jellybean, use this call to hide // the status bar. - if (Build.VERSION.SDK_INT < 16) { + if (Build.VERSION.SDK_INT < 16) { getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); } @@ -192,33 +191,3 @@ The {@link android.view.View#fitSystemWindows fitSystemWindows()} method is call view hierarchy when the content insets for a window have changed, to allow the window to adjust its content accordingly. By overriding this method you can handle the insets (and hence your app's layout) however you want.

    - -

    Synchronize the Status Bar with Action Bar Transition

    - -

    On Android 4.1 and higher, to avoid resizing your layout when the action bar hides and - shows, you can enable overlay mode for the action bar. - When in overlay mode, your activity layout uses all the - space available as if the action bar is not there and the system draws the action bar in - front of your layout. This obscures some of the layout at the top, but now when the - action bar hides or appears, the system does not need to resize your layout and the - transition is seamless.

    - -

    To enable overlay mode for the action bar, you need to create a custom theme that - extends an existing theme with an action bar and set the - {@code android:windowActionBarOverlay} attribute - to {@code true}. For more discussion of this topic, see - - Overlaying the Action Bar in the - Adding the Action Bar class.

    - - -

    Then use -{@link android.view.View#SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN}, -as described above, -to set your activity layout to use the same screen area that's available when you've enabled -{@link android.view.View#SYSTEM_UI_FLAG_FULLSCREEN}. - -When you want to hide the system UI, use -{@link android.view.View#SYSTEM_UI_FLAG_FULLSCREEN}. -This also hides the action bar (because {@code windowActionBarOverlay=”true”)} and does -so with a coordinated animation when both hiding and showing the two.