blob: dcf01ebd7d03decc60037818f983dc02a7079f90 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2022 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.
-->
<!--
Demonstrates Keep-Clear areas API.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="top|start">
<TextView
android:id="@+id/keep_clear_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:preferKeepClear="true"
android:gravity="center_vertical|center_horizontal"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="@string/keep_clear_property_set"
android:background="@color/transparent_red"/>
<Switch
android:id="@+id/set_prefer_keep_clear_toggle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/keep_clear_view"
android:padding="@dimen/keep_clear_text_view_padding"
android:text="@string/keep_clear_set_prefer_keep_clear_toggle" />
<Switch
android:id="@+id/set_bottom_right_rectangle_keep_clear_toggle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/set_prefer_keep_clear_toggle"
android:padding="@dimen/keep_clear_text_view_padding"
android:text="@string/keep_clear_set_bottom_right_rectangle_keep_clear_toggle" />
<TextView
android:id="@+id/keep_clear_view_bottom_right"
android:layout_width="wrap_content"
android:layout_height="@dimen/keep_clear_text_view_size"
android:gravity="center_vertical|center_horizontal"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="@string/keep_clear_view_bottom_right"
android:background="@color/transparent_green"/>
</RelativeLayout>