summaryrefslogtreecommitdiff
path: root/core/java/android/view/View.java
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2013-08-29 01:00:03 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-08-29 01:00:03 +0000
commitab8fe692961bb3bf71169fd7a43aff4de837ab26 (patch)
tree3570ad93e7b2b134e2564e6dc7d0d793ca37c694 /core/java/android/view/View.java
parent9fe5b28dc2a187f5974e42ac61841b46a5d91236 (diff)
parente47193d8e1795f334bcb29819a571f08bb742c68 (diff)
Merge "Rename hideybars constant to SYSTEM_UI_FLAG_IMMERSIVE." into klp-dev
Diffstat (limited to 'core/java/android/view/View.java')
-rw-r--r--core/java/android/view/View.java31
1 files changed, 20 insertions, 11 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 21a342fadd44..0b76ee61d616 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -2375,20 +2375,29 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
public static final int SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN = 0x00000400;
/**
- * Flag for {@link #setSystemUiVisibility(int)}: View would like to receive touch events
- * when hiding the status bar with {@link #SYSTEM_UI_FLAG_FULLSCREEN} and/or hiding the
- * navigation bar with {@link #SYSTEM_UI_FLAG_HIDE_NAVIGATION} instead of having the system
- * clear these flags upon interaction. The system may compensate by temporarily overlaying
- * semi-transparent system bars while also delivering the event.
- */
- public static final int SYSTEM_UI_FLAG_ALLOW_TRANSIENT = 0x00000800;
+ * Flag for {@link #setSystemUiVisibility(int)}: View would like to remain interactive when
+ * hiding the status bar with {@link #SYSTEM_UI_FLAG_FULLSCREEN} and/or hiding the navigation
+ * bar with {@link #SYSTEM_UI_FLAG_HIDE_NAVIGATION}. Use this flag to create an immersive
+ * experience while also hiding the system bars. If this flag is not set,
+ * {@link #SYSTEM_UI_FLAG_HIDE_NAVIGATION} will be force cleared by the system on any user
+ * interaction, and {@link #SYSTEM_UI_FLAG_FULLSCREEN} will be force-cleared by the system
+ * if the user swipes from the top of the screen.
+ * <p>When system bars are hidden in immersive mode, they can be revealed temporarily with
+ * system gestures, such as swiping from the top of the screen. These transient system bars
+ * will overlay app’s content, may have some degree of transparency, and will automatically
+ * hide after a short timeout.
+ * </p><p>Since this flag is a modifier for {@link #SYSTEM_UI_FLAG_FULLSCREEN} and
+ * {@link #SYSTEM_UI_FLAG_HIDE_NAVIGATION}, it only has an effect when used in combination
+ * with one or both of those flags.</p>
+ */
+ public static final int SYSTEM_UI_FLAG_IMMERSIVE = 0x00000800;
/**
* Flag for {@link #setSystemUiVisibility(int)}: View would like the status bar to have
* transparency.
*
* <p>The transparency request may be denied if the bar is in another mode with a specific
- * style, like {@link #SYSTEM_UI_FLAG_ALLOW_TRANSIENT transient mode}.
+ * style, like {@link #SYSTEM_UI_FLAG_IMMERSIVE immersive mode}.
*/
public static final int SYSTEM_UI_FLAG_TRANSPARENT_STATUS = 0x00001000;
@@ -2397,7 +2406,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
* transparency.
*
* <p>The transparency request may be denied if the bar is in another mode with a specific
- * style, like {@link #SYSTEM_UI_FLAG_ALLOW_TRANSIENT transient mode}.
+ * style, like {@link #SYSTEM_UI_FLAG_IMMERSIVE immersive mode}.
*/
public static final int SYSTEM_UI_FLAG_TRANSPARENT_NAVIGATION = 0x00002000;
@@ -16664,7 +16673,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
* @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},
- * {@link #SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN}, {@link #SYSTEM_UI_FLAG_ALLOW_TRANSIENT},
+ * {@link #SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN}, {@link #SYSTEM_UI_FLAG_IMMERSIVE},
* {@link #SYSTEM_UI_FLAG_TRANSPARENT_STATUS},
* and {@link #SYSTEM_UI_FLAG_TRANSPARENT_NAVIGATION}.
*/
@@ -16682,7 +16691,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
* @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},
- * {@link #SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN}, {@link #SYSTEM_UI_FLAG_ALLOW_TRANSIENT},
+ * {@link #SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN}, {@link #SYSTEM_UI_FLAG_IMMERSIVE},
* {@link #SYSTEM_UI_FLAG_TRANSPARENT_STATUS},
* and {@link #SYSTEM_UI_FLAG_TRANSPARENT_NAVIGATION}.
*/