Adding a resource to adjust the top padding of the preference seekbar.
Test: Manual, paintbooth
Bug: 147615198
Change-Id: Ifcaf49e973e72f84074ecb3927fef5b2e114325e
diff --git a/car-ui-lib/res/layout/car_ui_preference_widget_seekbar.xml b/car-ui-lib/res/layout/car_ui_preference_widget_seekbar.xml
index 9442e7e..e51059f 100644
--- a/car-ui-lib/res/layout/car_ui_preference_widget_seekbar.xml
+++ b/car-ui-lib/res/layout/car_ui_preference_widget_seekbar.xml
@@ -73,9 +73,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:background="@null"
- android:clickable="false"
- android:focusable="false"/>
+ style="@style/Widget.CarUi.SeekbarPreference.Seekbar"/>
<TextView
android:id="@+id/seekbar_value"
diff --git a/car-ui-lib/res/values/styles.xml b/car-ui-lib/res/values/styles.xml
index d22753f..526dd38 100644
--- a/car-ui-lib/res/values/styles.xml
+++ b/car-ui-lib/res/values/styles.xml
@@ -26,6 +26,8 @@
<style name="Widget.CarUi.Toolbar"/>
+ <style name="Widget.CarUi.SeekbarPreference"/>
+
<style name="Widget.CarUi.Toolbar.Container"/>
<style name="Widget.CarUi.Toolbar.NavIconContainer"/>
@@ -60,6 +62,13 @@
<item name="android:textColor">@color/car_ui_toolbar_menu_item_icon_color</item>
</style>
+ <!-- Style applied to the seekbar widget within the seekbar preference -->
+ <style name="Widget.CarUi.SeekbarPreference.Seekbar">
+ <item name="android:background">@null</item>
+ <item name="android:clickable">false</item>
+ <item name="android:focusable">false</item>
+ </style>
+
<!-- Style applied to the decoration view between toolbar rows -->
<style name="Widget.CarUi.Toolbar.SeparatorView">
<item name="android:height">0.01dp</item>