Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev
diff --git a/res/drawable/option_border.xml b/res/drawable/option_border.xml
new file mode 100644
index 0000000..6a9d5e9
--- /dev/null
+++ b/res/drawable/option_border.xml
@@ -0,0 +1,31 @@
+<?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.
+-->
+<ripple xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
+ android:color="?android:attr/colorControlHighlight">
+ <item android:id="@android:id/mask">
+ <shape android:shape="rectangle">
+ <solid android:color="@android:color/white"/>
+ <corners android:radius="@dimen/option_tile_radius" />
+ </shape>
+ </item>
+ <item>
+ <shape android:shape="rectangle">
+ <solid android:color="?androidprv:attr/colorSurface"/>
+ <corners android:radius="@dimen/option_tile_radius" />
+ </shape>
+ </item>
+</ripple>
diff --git a/res/layout/activity_customization_picker_main.xml b/res/layout/activity_customization_picker_main.xml
index 40af303..bec49fb 100755
--- a/res/layout/activity_customization_picker_main.xml
+++ b/res/layout/activity_customization_picker_main.xml
@@ -25,13 +25,13 @@
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_marginBottom="@dimen/bottom_navbar_height"/>
+ android:layout_marginBottom="@dimen/bottom_actions_height"/>
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/main_bottom_nav"
style="@style/BottomNavStyle"
android:layout_width="match_parent"
- android:layout_height="@dimen/bottom_navbar_height"
+ android:layout_height="@dimen/bottom_actions_height"
android:layout_gravity="bottom"
app:labelVisibilityMode="labeled"
app:menu="@menu/bottom_navigation_menu"/>
diff --git a/res/layout/activity_full_preview.xml b/res/layout/activity_full_preview.xml
index b1e0584..dff7a48 100644
--- a/res/layout/activity_full_preview.xml
+++ b/res/layout/activity_full_preview.xml
@@ -22,7 +22,7 @@
android:id="@+id/preview_fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_marginBottom="@dimen/bottom_navbar_height" />
+ android:layout_marginBottom="@dimen/bottom_actions_height" />
<include layout="@layout/bottom_action_bar" />
</FrameLayout>
diff --git a/res/layout/fragment_grid_picker.xml b/res/layout/fragment_grid_picker.xml
index f700310..7264d14 100644
--- a/res/layout/fragment_grid_picker.xml
+++ b/res/layout/fragment_grid_picker.xml
@@ -51,8 +51,8 @@
android:id="@+id/options_container"
android:layout_width="match_parent"
android:layout_height="@dimen/options_container_height"
- android:layout_marginBottom="@dimen/options_container_bottom_margin"
- android:layout_marginHorizontal="@dimen/options_container_horizontal_margin"
+ android:layout_marginBottom="@dimen/grid_options_container_bottom_margin"
+ android:layout_marginHorizontal="@dimen/grid_options_container_horizontal_margin"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index b5d024d..ab1393a 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -29,11 +29,15 @@
<dimen name="component_preview_page_bottom_margin">16dp</dimen>
<!-- Dimensions for the customization option tiles -->
- <dimen name="options_container_height">124dp</dimen>
+ <dimen name="options_container_height">112dp</dimen>
<dimen name="options_container_width">0dp</dimen>
- <dimen name="options_container_bottom_margin">12dp</dimen>
- <dimen name="options_container_horizontal_margin">24dp</dimen>
+ <dimen name="option_bottom_margin">8dp</dimen>
+ <dimen name="option_padding_horizontal">2dp</dimen>
<dimen name="option_tile_width">82dp</dimen>
+ <dimen name="option_tile_radius">20dp</dimen>
+ <dimen name="option_tile_margin_horizontal">6dp</dimen>
+ <dimen name="option_tile_padding_vertical">12dp</dimen>
+ <dimen name="option_tile_padding_horizontal">12dp</dimen>
<dimen name="option_icon_size">16dp</dimen>
<dimen name="theme_option_icon_sample_height">22dp</dimen>
<dimen name="theme_option_icon_sample_width">22dp</dimen>
@@ -42,19 +46,16 @@
<dimen name="theme_option_font_sample_height">20dp</dimen>
<dimen name="theme_option_font_sample_width">52dp</dimen>
<dimen name="theme_option_sample_margin">10dp</dimen>
- <!-- Note, using dp instead of sp as this is just the "+" symbol, not text -->
- <dimen name="option_tile_padding_vertical">12dp</dimen>
- <dimen name="option_tile_padding_horizontal">12dp</dimen>
- <dimen name="option_bottom_margin">8dp</dimen>
- <dimen name="option_padding_horizontal">2dp</dimen>
<!-- Note, using dp instead of sp as this text is more like a "snapshot" of the font -->
<dimen name="theme_option_font_text_size">20dp</dimen>
<dimen name="theme_option_font_min_text_size">15dp</dimen>
-
- <dimen name="option_tile_margin_horizontal">6dp</dimen>
<dimen name="theme_option_label_margin">4dp</dimen>
+ <!-- Dimensions for the grid options -->
+ <dimen name="grid_options_container_bottom_margin">@dimen/bottom_actions_height</dimen>
+ <dimen name="grid_options_container_horizontal_margin">24dp</dimen>
+
<dimen name="card_title_text_size">16sp</dimen>
<dimen name="card_header_icon_size">32dp</dimen>
<dimen name="preview_theme_max_height">400dp</dimen>
diff --git a/src/com/android/customization/picker/theme/ThemeOptionPreviewer.java b/src/com/android/customization/picker/theme/ThemeOptionPreviewer.java
index 850edf9..14b53ec 100644
--- a/src/com/android/customization/picker/theme/ThemeOptionPreviewer.java
+++ b/src/com/android/customization/picker/theme/ThemeOptionPreviewer.java
@@ -398,7 +398,7 @@
final Resources res = mContext.getResources();
return getDisplayHeight()
- getTopToolBarHeight()
- - res.getDimensionPixelSize(R.dimen.bottom_navbar_height)
+ - res.getDimensionPixelSize(R.dimen.bottom_actions_height)
- res.getDimensionPixelSize(R.dimen.full_preview_page_default_padding_top)
- res.getDimensionPixelSize(R.dimen.full_preview_page_default_padding_bottom);
}