Add Android 4.4 Immersive Mode DevByte sample code.

Change-Id: I3515e2742a4b8285f7e3f7c214af1d43dde605a0
This commit is contained in:
Roman Nurik
2013-10-28 11:00:57 -04:00
parent 30278c6f48
commit e7a6ab4fd8
12 changed files with 437 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
<!--
Copyright 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include layout="@layout/include_content" />
<!-- This FrameLayout insets its children based on system windows using
android:fitsSystemWindows. These insets will be stable across system
UI visibility changes because we use the SYSTEM_UI_FLAG_LAYOUT_STABLE
flag in addition to SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN and
SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION. -->
<FrameLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:fitsSystemWindows="true">
<LinearLayout android:id="@+id/fullscreen_content_controls"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal"
android:background="@color/fullscreen_control_overlay_color"
android:orientation="horizontal">
<Button android:id="@+id/placeholder_button"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="1"
android:text="@string/placeholder_button"
android:background="?android:selectableItemBackground" />
</LinearLayout>
</FrameLayout>
</FrameLayout>

View File

@@ -0,0 +1,23 @@
<!--
Copyright 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include layout="@layout/include_content" />
</FrameLayout>

View File

@@ -0,0 +1,31 @@
<!--
Copyright 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- The primary full-screen view. This can be replaced with whatever view
is needed to present your content, e.g. VideoView, SurfaceView,
TextureView, etc. -->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fullscreen_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:keepScreenOn="true"
android:textColor="#fb3"
android:fontFamily="sans-serif-condensed"
android:textStyle="bold"
android:lineSpacingMultiplier="0.8"
android:textSize="50sp"
android:gravity="center"
android:text="@string/placeholder_content" />