Merge "Allow resizing text sample in style thumbnail" into ub-launcher3-qt-future-dev
diff --git a/res/layout/preview_card_cover_content.xml b/res/layout/preview_card_cover_content.xml
index 055a126..3ab13a4 100644
--- a/res/layout/preview_card_cover_content.xml
+++ b/res/layout/preview_card_cover_content.xml
@@ -22,6 +22,7 @@
android:layout_gravity="center"
android:layout_marginHorizontal="@dimen/preview_theme_cover_content_extra_margin"
android:gravity="center_horizontal"
+ android:clipChildren="false"
tools:showIn="@layout/theme_preview_card">
<FrameLayout
android:layout_width="@dimen/preview_theme_icon_size"
diff --git a/res/layout/theme_component_preview.xml b/res/layout/theme_component_preview.xml
index fe2f691..43b8bf1 100644
--- a/res/layout/theme_component_preview.xml
+++ b/res/layout/theme_component_preview.xml
@@ -63,6 +63,7 @@
android:layout_height="0dp"
android:layout_marginHorizontal="8dp"
android:layout_marginTop="@dimen/preview_theme_content_margin"
+ android:clipChildren="false"
app:layout_constraintBottom_toTopOf="@+id/guideline"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHeight_max="@dimen/preview_theme_content_max_height"
diff --git a/src/com/android/customization/model/theme/custom/ColorOptionsProvider.java b/src/com/android/customization/model/theme/custom/ColorOptionsProvider.java
index a37f250..f3b950b 100644
--- a/src/com/android/customization/model/theme/custom/ColorOptionsProvider.java
+++ b/src/com/android/customization/model/theme/custom/ColorOptionsProvider.java
@@ -24,8 +24,6 @@
import static com.android.customization.model.ResourceConstants.OVERLAY_CATEGORY_ICON_ANDROID;
import static com.android.customization.model.ResourceConstants.OVERLAY_CATEGORY_SHAPE;
import static com.android.customization.model.ResourceConstants.PATH_SIZE;
-import static com.android.customization.model.ResourceConstants.SYSUI_PACKAGE;
-import static com.android.customization.model.theme.custom.ThemeComponentOption.ColorOption.COLOR_TILES_ICON_IDS;
import android.content.Context;
import android.content.pm.PackageManager;
diff --git a/src/com/android/customization/model/theme/custom/ThemeComponentOption.java b/src/com/android/customization/model/theme/custom/ThemeComponentOption.java
index f918d8e..6583433 100644
--- a/src/com/android/customization/model/theme/custom/ThemeComponentOption.java
+++ b/src/com/android/customization/model/theme/custom/ThemeComponentOption.java
@@ -379,10 +379,13 @@
seekbar.setProgressBackgroundTintList(seekbarTintList);
// Disable seekbar
seekbar.setOnTouchListener((view, motionEvent) -> true);
+
+ int iconFgColor = res.getColor(R.color.tile_enabled_icon_color, null);
if (!mIcons.isEmpty() && mShapeDrawable != null) {
for (int i = 0; i < COLOR_TILE_IDS.length; i++) {
Drawable icon = mIcons.get(COLOR_TILES_ICON_IDS[i][1]).getConstantState()
.newDrawable();
+ icon.setTint(iconFgColor);
//TODO: load and set the shape.
Drawable bgShape = mShapeDrawable.getConstantState().newDrawable();
bgShape.setTint(accentColor);
diff --git a/src/com/android/customization/picker/theme/ThemeFragment.java b/src/com/android/customization/picker/theme/ThemeFragment.java
index e4682bb..641d3e1 100644
--- a/src/com/android/customization/picker/theme/ThemeFragment.java
+++ b/src/com/android/customization/picker/theme/ThemeFragment.java
@@ -23,7 +23,6 @@
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
-import android.graphics.Matrix;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.LayerDrawable;
@@ -455,10 +454,12 @@
// Disable seekbar
seekbar.setOnTouchListener((view, motionEvent) -> true);
+ int iconFgColor = res.getColor(R.color.tile_enabled_icon_color, null);
for (int i = 0; i < mColorTileIds.length && i < previewInfo.icons.size();
i++) {
Drawable icon = previewInfo.icons.get(mColorTileIconIds[i][1])
.getConstantState().newDrawable().mutate();
+ icon.setTint(iconFgColor);
Drawable bgShape =
previewInfo.shapeDrawable.getConstantState().newDrawable();
bgShape.setTint(accentColor);