Update the material next style for the banner of Auto Click.
Action:
Apply the illustrationPreference from SettingsLib to the banner.
Bug: 190585192
Bug: 192413239
Test: manual test
Change-Id: I7d78804b4fa89735edfb73f01f31771821bcd8c2
diff --git a/res/layout/accessibility_autoclick_preview.xml b/res/layout/accessibility_autoclick_preview.xml
deleted file mode 100644
index 4fa3f8f..0000000
--- a/res/layout/accessibility_autoclick_preview.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2019 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="wrap_content">
-
- <ImageView
- android:layout_width="match_parent"
- android:layout_height="@dimen/autoclick_preview_height"
- android:contentDescription="@null"
- android:scaleType="fitCenter"
- android:src="@drawable/accessibility_dwell"/>
-
-</FrameLayout>
diff --git a/res/xml/accessibility_autoclick_settings.xml b/res/xml/accessibility_autoclick_settings.xml
index ee27cea..06b3dce 100644
--- a/res/xml/accessibility_autoclick_settings.xml
+++ b/res/xml/accessibility_autoclick_settings.xml
@@ -19,14 +19,13 @@
xmlns:settings="http://schemas.android.com/apk/res-auto"
android:title="@string/accessibility_autoclick_preference_title">
- <com.android.settingslib.widget.LayoutPreference
- android:key="accessibility_autoclick_preview"
- android:layout="@layout/accessibility_autoclick_preview"
+ <com.android.settingslib.widget.IllustrationPreference
+ android:key="accessibility_autoclick_banner"
android:persistent="false"
android:selectable="false"
- android:title="@string/summary_placeholder"
settings:allowDividerBelow="true"
- settings:searchable="false" />
+ settings:searchable="false"
+ settings:lottie_rawRes="@drawable/accessibility_dwell" />
<com.android.settingslib.widget.RadioButtonPreference
android:key="accessibility_control_autoclick_default"