Loading src/com/android/customization/model/theme/custom/ColorOptionsProvider.java +0 −2 Original line number Diff line number Diff line Loading @@ -24,8 +24,6 @@ import static com.android.customization.model.ResourceConstants.OVERLAY_CATEGORY 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; Loading src/com/android/customization/model/theme/custom/ThemeComponentOption.java +3 −0 Original line number Diff line number Diff line Loading @@ -379,10 +379,13 @@ public abstract class ThemeComponentOption implements CustomizationOption<ThemeC 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); Loading src/com/android/customization/picker/theme/ThemeFragment.java +2 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ import android.content.res.ColorStateList; 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; Loading Loading @@ -455,10 +454,12 @@ public class ThemeFragment extends ToolbarFragment { // 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); Loading Loading
src/com/android/customization/model/theme/custom/ColorOptionsProvider.java +0 −2 Original line number Diff line number Diff line Loading @@ -24,8 +24,6 @@ import static com.android.customization.model.ResourceConstants.OVERLAY_CATEGORY 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; Loading
src/com/android/customization/model/theme/custom/ThemeComponentOption.java +3 −0 Original line number Diff line number Diff line Loading @@ -379,10 +379,13 @@ public abstract class ThemeComponentOption implements CustomizationOption<ThemeC 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); Loading
src/com/android/customization/picker/theme/ThemeFragment.java +2 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ import android.content.res.ColorStateList; 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; Loading Loading @@ -455,10 +454,12 @@ public class ThemeFragment extends ToolbarFragment { // 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); Loading