Replace "*android:" by "chassis" resources
Standardize resource names, reduce unnecessary resource indirections
(e.g. normal/night colors on the regular colors resource file).
Allow for non-square touch target and icons. Migrate some of the
internal 'car' resources to the chassis lib.
Test all these changes in the Paintbooth test app.
Bug: 139958595
Test: Manual
Change-Id: I70a46d16873f186e0a6d2b158d52628d1eca647d
diff --git a/car-chassis-lib/res/values/dimens.xml b/car-chassis-lib/res/values/dimens.xml
index 6bc61dd..0226617 100644
--- a/car-chassis-lib/res/values/dimens.xml
+++ b/car-chassis-lib/res/values/dimens.xml
@@ -14,22 +14,49 @@
limitations under the License.
-->
<resources>
- <dimen name="touch_target_size">@*android:dimen/car_touch_target_size</dimen>
- <dimen name="primary_icon_size">@*android:dimen/car_primary_icon_size</dimen>
- <item name="letter_spacing_body1" format="float" type="dimen">0.0</item>
- <item name="letter_spacing_body3" format="float" type="dimen">0.0</item>
+ <!-- General resources -->
+
+ <dimen name="chassis_touch_target_width">76dp</dimen>
+ <dimen name="chassis_touch_target_height">76dp</dimen>
+ <dimen name="chassis_primary_icon_size">44dp</dimen>
+ <item name="chassis_letter_spacing_body1" format="float" type="dimen">0.0</item>
+ <item name="chassis_letter_spacing_body3" format="float" type="dimen">0.0</item>
+
+ <!-- Application Bar -->
+ <dimen name="chassis_app_bar_height">80dp</dimen>
+
+ <!-- Margin -->
+ <dimen name="chassis_margin">20dp</dimen>
+
+ <!-- Paddings -->
+ <dimen name="chassis_padding_0">4dp</dimen>
+ <dimen name="chassis_padding_1">8dp</dimen>
+ <dimen name="chassis_padding_2">16dp</dimen>
+ <dimen name="chassis_padding_3">24dp</dimen>
+ <dimen name="chassis_padding_4">32dp</dimen>
+ <dimen name="chassis_padding_5">64dp</dimen>
+ <dimen name="chassis_padding_6">96dp</dimen>
<!-- Tabs -->
- <dimen name="chassis_tab_width">135dp</dimen>
+
+ <!-- Exact size of the tab textbox. Use @dimen/wrap_content if this must be flexible -->
+ <dimen name="chassis_tab_text_width">135dp</dimen>
+ <!-- Horizontal padding between tabs -->
<dimen name="chassis_tab_padding_x">12dp</dimen>
- <dimen name="chassis_tab_icon_size">36dp</dimen>
+ <!-- Tab icon width (if icons are enabled) -->
+ <dimen name="chassis_tab_icon_width">36dp</dimen>
+ <!-- Tab icon height (if icons are enabled) -->
+ <dimen name="chassis_tab_icon_height">36dp</dimen>
<!-- Car toolbar -->
- <dimen name="chassis_toolbar_view_nav_button_width">@*android:dimen/car_margin</dimen>
- <dimen name="chassis_toolbar_first_row_height">@*android:dimen/car_app_bar_height</dimen>
+ <dimen name="chassis_toolbar_view_nav_button_width">@dimen/chassis_margin</dimen>
+ <dimen name="chassis_toolbar_first_row_height">@dimen/chassis_app_bar_height</dimen>
<dimen name="chassis_toolbar_second_row_height">0dp</dimen>
- <dimen name="chassis_toolbar_view_icon_size">@*android:dimen/car_primary_icon_size</dimen>
- <dimen name="chassis_toolbar_view_title_margin_start">@*android:dimen/car_padding_2</dimen>
- <dimen name="chassis_toolbar_custom_button_margin">@*android:dimen/car_padding_2</dimen>
+ <dimen name="chassis_toolbar_view_icon_size">@dimen/chassis_primary_icon_size</dimen>
+ <dimen name="chassis_toolbar_view_title_margin_start">@dimen/chassis_padding_2</dimen>
+ <dimen name="chassis_toolbar_custom_button_margin">@dimen/chassis_padding_2</dimen>
<dimen name="chassis_toolbar_button_background_radius">48dp</dimen>
+
+ <!-- Internal artifacts. Do not overlay -->
+ <item name="wrap_content" format="integer" type="dimen">-2</item>
</resources>