aboutsummaryrefslogtreecommitdiff
path: root/RotaryPlayground/res
diff options
context:
space:
mode:
authorYabin Huang <yabinh@google.com>2021-08-12 12:29:20 -0700
committerYabin Huang <yabinh@google.com>2021-08-19 22:18:46 +0000
commit2b9df41b68200f43ae55e901f5a8bdab53d2ecae (patch)
treef9fed77efa60ac40fedb06833e01349fdd7f3d61 /RotaryPlayground/res
parent01091850d9e99ffabcd8091c3dc15473adc47303 (diff)
downloadtests-2b9df41b68200f43ae55e901f5a8bdab53d2ecae.tar.gz
Add an example of popup window
Bug: 194954154 Test: manual Change-Id: Ifbd468ec38a2cb519e5f5343dde5e64c10d2a8aa
Diffstat (limited to 'RotaryPlayground/res')
-rw-r--r--RotaryPlayground/res/layout/list_item.xml20
-rw-r--r--RotaryPlayground/res/layout/popup_window_fragment.xml26
-rw-r--r--RotaryPlayground/res/layout/rotary_menu.xml7
3 files changed, 53 insertions, 0 deletions
diff --git a/RotaryPlayground/res/layout/list_item.xml b/RotaryPlayground/res/layout/list_item.xml
new file mode 100644
index 0000000..dd36ec7
--- /dev/null
+++ b/RotaryPlayground/res/layout/list_item.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2021 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.
+ -->
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:focusable="true"/>
diff --git a/RotaryPlayground/res/layout/popup_window_fragment.xml b/RotaryPlayground/res/layout/popup_window_fragment.xml
new file mode 100644
index 0000000..f3ba9d2
--- /dev/null
+++ b/RotaryPlayground/res/layout/popup_window_fragment.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2021 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.
+ -->
+<com.android.car.ui.FocusArea
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+ <Button
+ android:id="@+id/overflow"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Overflow Button"/>
+</com.android.car.ui.FocusArea>
diff --git a/RotaryPlayground/res/layout/rotary_menu.xml b/RotaryPlayground/res/layout/rotary_menu.xml
index e2a523a..53f17b7 100644
--- a/RotaryPlayground/res/layout/rotary_menu.xml
+++ b/RotaryPlayground/res/layout/rotary_menu.xml
@@ -77,6 +77,13 @@
android:text="Custom FocusAreas"
style="@style/tab" />
<Button
+ android:id="@+id/popup_window"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ android:text="Popup window"
+ style="@style/tab" />
+ <Button
android:id="@+id/surface_view"
android:layout_width="match_parent"
android:layout_height="0dp"