aboutsummaryrefslogtreecommitdiff
path: root/RotaryPlayground/res
diff options
context:
space:
mode:
Diffstat (limited to 'RotaryPlayground/res')
-rw-r--r--RotaryPlayground/res/layout/rotary_menu.xml6
-rw-r--r--RotaryPlayground/res/layout/rotary_sys_ui_direct_manipulation.xml86
-rw-r--r--RotaryPlayground/res/values/ids.xml23
-rw-r--r--RotaryPlayground/res/values/strings.xml6
4 files changed, 121 insertions, 0 deletions
diff --git a/RotaryPlayground/res/layout/rotary_menu.xml b/RotaryPlayground/res/layout/rotary_menu.xml
index 659f119..df3ec19 100644
--- a/RotaryPlayground/res/layout/rotary_menu.xml
+++ b/RotaryPlayground/res/layout/rotary_menu.xml
@@ -33,6 +33,12 @@
android:layout_weight="1"
android:text="Direct Manipulation" />
<Button
+ android:id="@+id/sys_ui_direct_manipulation"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ android:text="Sys UI Manipulation" />
+ <Button
android:id="@+id/grid"
android:layout_width="match_parent"
android:layout_height="0dp"
diff --git a/RotaryPlayground/res/layout/rotary_sys_ui_direct_manipulation.xml b/RotaryPlayground/res/layout/rotary_sys_ui_direct_manipulation.xml
new file mode 100644
index 0000000..9e30a1d
--- /dev/null
+++ b/RotaryPlayground/res/layout/rotary_sys_ui_direct_manipulation.xml
@@ -0,0 +1,86 @@
+<!--
+ ~ Copyright (C) 2020 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 purpose of this screen is to demonstrate the direct manipulation capabilities in a
+system window. Not all widgets in a system window may support direct manipulation. Some
+of the widgets in this page support direct manipulation and some are left as unsupported for
+demonstrating the relevant behavior.
+
+Note that nudges are not supported in direct manipulation mode for system windows.
+
+The behavior of the UI on this page is intended to be tested while setting the value of
+RotaryController#TREAT_APP_WINDOW_AS_SYSTEM_WINDOW constant to true.
+-->
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="horizontal">
+
+ <!-- Widgets in the first half of the screen support Direct Manipulation and
+ those in the second half don't. This is set programmatically. -->
+ <com.android.car.ui.FocusArea
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:orientation="vertical">
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:text="@string/sys_ui_supports_dm">
+ </TextView>
+ <SeekBar
+ android:id="@+id/direct_manipulation_supported_seek_bar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="@drawable/seek_bar_background">
+ </SeekBar>
+ <RadialTimePickerView
+ android:id="@+id/direct_manipulation_supported_radial_time_picker"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ android:focusable="true">
+ </RadialTimePickerView>
+ </com.android.car.ui.FocusArea>
+
+ <com.android.car.ui.FocusArea
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:orientation="vertical">
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:text="@string/sys_ui_does_not_support_dm">
+ </TextView>
+ <SeekBar
+ android:id="@+id/direct_manipulation_unsupported_seek_bar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="@drawable/seek_bar_background">
+ </SeekBar>
+ <RadialTimePickerView
+ android:id="@+id/direct_manipulation_unsupported_radial_time_picker"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ android:focusable="true">
+ </RadialTimePickerView>
+ </com.android.car.ui.FocusArea>
+</LinearLayout>
diff --git a/RotaryPlayground/res/values/ids.xml b/RotaryPlayground/res/values/ids.xml
new file mode 100644
index 0000000..083862e
--- /dev/null
+++ b/RotaryPlayground/res/values/ids.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2020 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.
+ -->
+<resources>
+ <!--
+ Used for storing and retrieving the background of a View in order to change it to an
+ alternative background but have the ability to restore it back to its original look.
+ -->
+ <item type="id" name="saved_background_tag"/>
+</resources> \ No newline at end of file
diff --git a/RotaryPlayground/res/values/strings.xml b/RotaryPlayground/res/values/strings.xml
index 35c960a..7720216 100644
--- a/RotaryPlayground/res/values/strings.xml
+++ b/RotaryPlayground/res/values/strings.xml
@@ -33,4 +33,10 @@
<string name="lorem" translatable="false">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et velit finibus, tempor ipsum vel, pellentesque lorem. Suspendisse congue urna pulvinar, congue dolor in, eleifend orci. Nam egestas sodales sapien. Integer sit amet ligula in ex commodo semper. Phasellus ac facilisis ligula. Ut mollis risus eu nunc consequat, eu molestie dolor maximus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Donec commodo lectus non est lacinia accumsan. Nulla tristique cursus iaculis. Sed in hendrerit nulla, vel faucibus mi. Aenean placerat turpis eros, non sagittis enim viverra id. Vestibulum vel rutrum est, eu consequat felis. Maecenas ac suscipit ante. Fusce dapibus ut libero blandit vehicula. Vivamus vel ipsum condimentum, maximus tellus nec, rutrum lorem.
</string>
+ <string name="sys_ui_supports_dm" translatable="true">
+ Supports Direct Manipulation Mode
+ </string>
+ <string name="sys_ui_does_not_support_dm" translatable="true">
+ Doesn\'t support Direct Manipulation Mode
+ </string>
</resources>