Home | History | Annotate | Download | only in AdvancedImmersiveMode
      1 <?xml version="1.0" encoding="UTF-8"?>
      2 <!--
      3  Copyright 2013 The Android Open Source Project
      4 
      5  Licensed under the Apache License, Version 2.0 (the "License");
      6  you may not use this file except in compliance with the License.
      7  You may obtain a copy of the License at
      8 
      9      http://www.apache.org/licenses/LICENSE-2.0
     10 
     11  Unless required by applicable law or agreed to in writing, software
     12  distributed under the License is distributed on an "AS IS" BASIS,
     13  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14  See the License for the specific language governing permissions and
     15  limitations under the License.
     16 -->
     17 <sample>
     18     <name>AdvancedImmersiveMode</name>
     19     <group>UI</group>
     20     <package>com.example.android.advancedimmersivemode</package>
     21 
     22     <minSdk>19</minSdk>
     23 
     24     <strings>
     25         <intro>
     26             <![CDATA[
     27             \n\n\n\"Immersive Mode\", added in Android 4.4, improves the \"hide full screen\" and
     28             \"hide nav bar\" modes, by letting users swipe the bars in and out.  This sample
     29             lets the user experiment with immersive mode by seeing how it interacts
     30             with some of the other UI flags related to full-screen apps.
     31             ]]>
     32         </intro>
     33         <sample_action>Try these settings!</sample_action>
     34     </strings>
     35 
     36     <template src="base"/>
     37     <template src="FragmentView"/>
     38     <common src="logger"/>
     39     <common src="activities"/>
     40     <metadata>
     41         <status>PUBLISHED</status>
     42         <categories>Window</categories>
     43         <technologies>Android</technologies>
     44         <languages>Java</languages>
     45         <solutions>Mobile</solutions>
     46         <level>INTERMEDIATE</level>
     47         <icon>screenshots/icon-web.png</icon>
     48         <screenshots>
     49             <img>screenshots/immersion.png</img>
     50             <img>screenshots/leanback.png</img>
     51         </screenshots>
     52         <api_refs>
     53             <android>android.view.Window</android>
     54         </api_refs>
     55 
     56         <description>
     57 <![CDATA[
     58 Immersive Mode, added in Android 4.4, improves the "hide full screen" and
     59 "hide nav bar" modes by letting users swipe the bars in and out.  This sample
     60 lets the user experiment with immersive mode by seeing how it interacts
     61 with some of the other UI flags related to full-screen apps.
     62 ]]>
     63         </description>
     64 
     65         <intro>
     66 <![CDATA[
     67 Android 4.4 (API Level 19) introduces a new `SYSTEM_UI_FLAG_IMMERSIVE`
     68 flag for [setSystemUiVisibility()][1] that lets your app go truly "full
     69 screen." This flag, when combined with the `SYSTEM_UI_FLAG_HIDE_NAVIGATION` and
     70 `SYSTEM_UI_FLAG_FULLSCREEN` flags, hides the navigation and status bars
     71 and lets your app capture all touch events on the screen.
     72 
     73 When immersive full-screen mode is enabled, your activity continues
     74 to receive all touch events. The user can reveal the system bars with
     75 an inward swipe along the region where the system bars normally
     76 appear.
     77 
     78 [1]: http://developer.android.com/reference/android/view/View.html#setSystemUiVisibility(int)
     79 ]]>
     80         </intro>
     81     </metadata>
     82 </sample>
     83