to top
Android APIs
 

overscan.xml

← Back

The file containing the source code shown below is located in the corresponding directory in <sdk>/samples/android-<version>/...

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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"
    >
    <view class="com.example.android.apis.view.OverscanActivity$IV"
        android:id="@+id/image"
        android:src="@drawable/frantic"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scaleType="center"
        />
    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fitsSystemWindows="true">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="25dp"
            android:layout_marginRight="25dp"
            android:layout_marginBottom="25dp"
            android:layout_gravity="bottom|center"
            android:background="#60000000"
            android:padding="8dp"
            android:orientation="vertical"
            >
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:baselineAligned="true"
                >
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:textColor="#FFFFFFFF"
                    android:textSize="16dp"
                    android:textStyle="bold"
                    android:gravity="left"
                    android:text="Mode:"
                    />
                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:baselineAlignedChildIndex="0"
                    >
                    <CheckBox
                        android:id="@+id/modeLowProfile"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:textColor="#FFFFFFFF"
                        android:text="LOW_PROFILE"
                        />
                    <CheckBox
                        android:id="@+id/modeFullscreen"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="-10dp"
                        android:textColor="#FFFFFFFF"
                        android:text="FULLSCREEN"
                        />
                    <CheckBox
                        android:id="@+id/modeHideNavigation"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="-10dp"
                        android:textColor="#FFFFFFFF"
                        android:text="HIDE_NAVIGATION"
                        />
                </LinearLayout>
            </LinearLayout>
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:baselineAligned="true"
                >
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:textColor="#FFFFFFFF"
                    android:textSize="16dp"
                    android:textStyle="bold"
                    android:gravity="left"
                    android:text="Layout:"
                    />
                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:baselineAlignedChildIndex="0"
                    >
                    <CheckBox
                        android:id="@+id/layoutStable"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:textColor="#FFFFFFFF"
                        android:text="STABLE"
                        />
                    <CheckBox
                        android:id="@+id/layoutFullscreen"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="-10dp"
                        android:textColor="#FFFFFFFF"
                        android:text="FULLSCREEN"
                        />
                    <CheckBox
                        android:id="@+id/layoutHideNavigation"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="-10dp"
                        android:textColor="#FFFFFFFF"
                        android:text="HIDE_NAVIGATION"
                        />
                </LinearLayout>
            </LinearLayout>
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:baselineAligned="true"
                >
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:textColor="#FFFFFFFF"
                    android:textSize="16dp"
                    android:textStyle="bold"
                    android:gravity="left"
                    android:text="Window:"
                    />
                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:baselineAlignedChildIndex="0"
                    >
                    <CheckBox
                        android:id="@+id/windowFullscreen"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:textColor="#FFFFFFFF"
                        android:text="FULLSCREEN"
                        />
                    <CheckBox
                        android:id="@+id/windowHideActionBar"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="-10dp"
                        android:textColor="#FFFFFFFF"
                        android:text="Hide ActionBar"
                        />
                    <CheckBox
                        android:id="@+id/windowActionMode"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="-10dp"
                        android:textColor="#FFFFFFFF"
                        android:text="Action Mode"
                        />
                    <!-- Crappy hack to make these the same size as the
                         above groups.  You'd never do this in real code. -->
                    <CheckBox
                        android:layout_width="wrap_content"
                        android:layout_height="0dp"
                        android:textColor="#FFFFFFFF"
                        android:text="HIDE_NAVIGATION"
                        />
                </LinearLayout>
            </LinearLayout>
            <TextView
                android:id="@+id/metricsText"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textColor="#FFFFFFFF"
                android:textSize="11dp"
                android:textStyle="bold"
                android:gravity="center"
                />
        </LinearLayout>
    </FrameLayout>
</FrameLayout>