Clean up Chassis resources
-Remove night and screen size variants. The values will be determined in
RROs.
-Prefix divider with chassis namespace.
Bug: 140443143
Test: manual in Paint Booth
Change-Id: Iecb27cef60a3240c85a3337b8de990b93910ce2c
diff --git a/car-chassis-lib/res/drawable/divider.xml b/car-chassis-lib/res/drawable/chassis_divider.xml
similarity index 100%
rename from car-chassis-lib/res/drawable/divider.xml
rename to car-chassis-lib/res/drawable/chassis_divider.xml
diff --git a/car-chassis-lib/res/values-night/colors.xml b/car-chassis-lib/res/values-night/colors.xml
deleted file mode 100644
index 6e0aebe..0000000
--- a/car-chassis-lib/res/values-night/colors.xml
+++ /dev/null
@@ -1,25 +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.
--->
-<resources>
- <!-- General -->
-
- <!-- Main text color (titles, text body, etc.) -->
- <color name="chassis_primary_text_color">#E2FFFFFF</color>
- <!-- Text color used in subtitles or other secondary text blocks -->
- <color name="chassis_secondary_text_color">#80FFFFFF</color>
- <!-- The ripple color for a card. -->
- <color name="chassis_card_ripple_background">#8F000000</color>
-</resources>
diff --git a/car-chassis-lib/res/values-w1280dp/dimens.xml b/car-chassis-lib/res/values-w1280dp/dimens.xml
deleted file mode 100644
index 2794db3..0000000
--- a/car-chassis-lib/res/values-w1280dp/dimens.xml
+++ /dev/null
@@ -1,20 +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.
- -->
-<resources>
- <!-- Margin -->
- <dimen name="chassis_margin">148dp</dimen>
-</resources>
\ No newline at end of file
diff --git a/car-chassis-lib/res/values-w1920dp/dimens.xml b/car-chassis-lib/res/values-w1920dp/dimens.xml
deleted file mode 100644
index dc68fdf..0000000
--- a/car-chassis-lib/res/values-w1920dp/dimens.xml
+++ /dev/null
@@ -1,20 +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.
- -->
-<resources>
- <!-- Margin -->
- <dimen name="chassis_margin">192dp</dimen>
-</resources>
\ No newline at end of file
diff --git a/car-chassis-lib/res/values-w690dp/dimens.xml b/car-chassis-lib/res/values-w690dp/dimens.xml
deleted file mode 100644
index dbfb227..0000000
--- a/car-chassis-lib/res/values-w690dp/dimens.xml
+++ /dev/null
@@ -1,20 +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.
- -->
-<resources>
- <!-- Margin -->
- <dimen name="chassis_margin">112dp</dimen>
-</resources>
\ No newline at end of file
diff --git a/car-chassis-lib/res/values/config.xml b/car-chassis-lib/res/values/config.xml
index 1ecdf6a..47a89aa 100644
--- a/car-chassis-lib/res/values/config.xml
+++ b/car-chassis-lib/res/values/config.xml
@@ -42,6 +42,6 @@
<integer name="chassis_scrollbar_position">0</integer>
<!-- Width of the scrollbar container. -->
- <dimen name="chassis_scrollbar_container_width" translatable="false">@dimen/chassis_margin</dimen>
+ <dimen name="chassis_scrollbar_container_width">@dimen/chassis_margin</dimen>
</resources>
\ No newline at end of file
diff --git a/car-chassis-lib/res/values/dimens.xml b/car-chassis-lib/res/values/dimens.xml
index 5565bfb..d299edc 100644
--- a/car-chassis-lib/res/values/dimens.xml
+++ b/car-chassis-lib/res/values/dimens.xml
@@ -26,7 +26,7 @@
<dimen name="chassis_app_bar_height">80dp</dimen>
<!-- Margin -->
- <dimen name="chassis_margin">20dp</dimen>
+ <dimen name="chassis_margin">112dp</dimen>
<!-- Paddings -->
<dimen name="chassis_padding_0">4dp</dimen>
diff --git a/car-chassis-lib/src/com/android/car/chassis/pagedrecyclerview/PagedRecyclerView.java b/car-chassis-lib/src/com/android/car/chassis/pagedrecyclerview/PagedRecyclerView.java
index 677754e..3296caa 100644
--- a/car-chassis-lib/src/com/android/car/chassis/pagedrecyclerview/PagedRecyclerView.java
+++ b/car-chassis-lib/src/com/android/car/chassis/pagedrecyclerview/PagedRecyclerView.java
@@ -319,8 +319,8 @@
if (enableDivider) {
mDividerItemDecoration =
new GridDividerItemDecoration(
- context.getDrawable(R.drawable.divider),
- context.getDrawable(R.drawable.divider),
+ context.getDrawable(R.drawable.chassis_divider),
+ context.getDrawable(R.drawable.chassis_divider),
mNumOfColumns);
super.addItemDecoration(mDividerItemDecoration);
}