diff options
Diffstat (limited to 'RotaryPlayground/res')
-rw-r--r-- | RotaryPlayground/res/layout/rotary_scroll.xml | 9 | ||||
-rw-r--r-- | RotaryPlayground/res/layout/rotary_web_view.xml | 3 |
2 files changed, 10 insertions, 2 deletions
diff --git a/RotaryPlayground/res/layout/rotary_scroll.xml b/RotaryPlayground/res/layout/rotary_scroll.xml index 4153ca1..ed550cd 100644 --- a/RotaryPlayground/res/layout/rotary_scroll.xml +++ b/RotaryPlayground/res/layout/rotary_scroll.xml @@ -17,6 +17,7 @@ <com.android.car.ui.FocusArea xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> @@ -26,11 +27,17 @@ android:layout_height="wrap_content" android:singleLine="true"/> + <!-- Use contentDescription to enable rotary scrolling for this view. With rotary scrolling + enabled, rotation will scroll rather than moving the focus if moving the focus would + cause a lot of scrolling. Rotary scrolling should be enabled for scrolling views which + contain content which the user may want to see but can't interact with, either alone or + with interactive (focusable) content. --> <com.android.car.ui.recyclerview.CarUiRecyclerView android:id="@+id/rotary_scroll_view" android:layout_width="match_parent" android:layout_height="0dp" - android:layout_weight="1"/> + android:layout_weight="1" + app:rotaryScrollEnabled="true"/> <EditText android:layout_width="match_parent" diff --git a/RotaryPlayground/res/layout/rotary_web_view.xml b/RotaryPlayground/res/layout/rotary_web_view.xml index 7995dc6..6cdc5dd 100644 --- a/RotaryPlayground/res/layout/rotary_web_view.xml +++ b/RotaryPlayground/res/layout/rotary_web_view.xml @@ -51,7 +51,8 @@ android:id="@+id/web_view" android:layout_width="match_parent" android:layout_height="0dp" - android:layout_weight="1" /> + android:layout_weight="1" + android:defaultFocusHighlightEnabled="false"/> <Button android:id="@+id/bottom_button" |