diff options
| author | Dianne Hackborn <hackbod@google.com> | 2012-05-16 19:41:09 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-05-16 19:41:09 -0700 |
| commit | 20c0cdbbf79cef18e59514e0f53dfbcac0bef600 (patch) | |
| tree | 340905cf0b0912141a606ccb6a875ee0dfbe09a8 /core/java | |
| parent | a4c1b0a7ca48c0b9fcc0a4af393faf64d0a16b91 (diff) | |
| parent | 5b5cc4d5361c1817938d2db58ad40aab528b3ac3 (diff) | |
Merge "Have the stable layout take into account the window's fullscreen flag." into jb-dev
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/view/View.java | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 62c267f43312..e4062e605ae1 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -2255,9 +2255,27 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * flags, we would like a stable view of the content insets given to * {@link #fitSystemWindows(Rect)}. This means that the insets seen there * will always represent the worst case that the application can expect - * as a continue state. In practice this means with any of system bar, - * nav bar, and status bar shown, but not the space that would be needed - * for an input method. + * as a continuous state. In the stock Android UI this is the space for + * the system bar, nav bar, and status bar, but not more transient elements + * such as an input method. + * + * The stable layout your UI sees is based on the system UI modes you can + * switch to. That is, if you specify {@link #SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN} + * then you will get a stable layout for changes of the + * {@link #SYSTEM_UI_FLAG_FULLSCREEN} mode; if you specify + * {@link #SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN} and + * {@link #SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION}, then you can transition + * to {@link #SYSTEM_UI_FLAG_FULLSCREEN} and {@link #SYSTEM_UI_FLAG_HIDE_NAVIGATION} + * with a stable layout. (Note that you should avoid using + * {@link #SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION} by itself.) + * + * If you have set the window flag {@ WindowManager.LayoutParams#FLAG_FULLSCREEN} + * to hide the status bar (instead of using {@link #SYSTEM_UI_FLAG_FULLSCREEN}), + * then a hidden status bar will be considered a "stable" state for purposes + * here. This allows your UI to continually hide the status bar, while still + * using the system UI flags to hide the action bar while still retaining + * a stable layout. Note that changing the window fullscreen flag will never + * provide a stable layout for a clean transition. * * <p>If you are using ActionBar in * overlay mode with {@link Window#FEATURE_ACTION_BAR_OVERLAY |
