Loading res/values/attrs.xml +8 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ <attr name="folderDotColor" format="color" /> <attr name="folderIconRadius" format="float" /> <attr name="folderIconBorderColor" format="color" /> <!-- BubbleTextView specific attributes. --> <declare-styleable name="BubbleTextView"> Loading @@ -52,6 +53,13 @@ <attr name="centerVertically" format="boolean" /> </declare-styleable> <!-- BubbleTextView specific attributes. --> <declare-styleable name="FolderIconPreview"> <attr name="android:colorPrimary" /> <attr name="folderIconBorderColor" /> <attr name="folderDotColor" /> </declare-styleable> <declare-styleable name="ShadowInfo"> <attr name="ambientShadowColor" format="color" /> <attr name="ambientShadowBlur" format="dimension" /> Loading res/values/styles.xml +4 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ <item name="workspaceStatusBarScrim">@drawable/workspace_bg</item> <item name="widgetsTheme">@style/WidgetContainerTheme</item> <item name="folderDotColor">?android:attr/colorPrimary</item> <item name="folderIconBorderColor">?android:attr/colorPrimary</item> <item name="loadingIconColor">#FFF</item> <item name="android:windowTranslucentStatus">false</item> Loading @@ -60,6 +61,8 @@ <item name="workspaceKeyShadowColor">@android:color/transparent</item> <item name="isWorkspaceDarkText">true</item> <item name="workspaceStatusBarScrim">@null</item> <item name="folderDotColor">#FF464646</item> <item name="folderIconBorderColor">#FF80868B</item> </style> <style name="LauncherTheme.Dark" parent="@style/LauncherTheme"> Loading @@ -77,6 +80,7 @@ <item name="popupColorTertiary">#757575</item> <!-- Gray 600 --> <item name="widgetsTheme">@style/WidgetContainerTheme.Dark</item> <item name="folderDotColor">#FF464646</item> <item name="folderIconBorderColor">#FF80868B</item> <item name="isMainColorDark">true</item> <item name="loadingIconColor">#000</item> </style> Loading src/com/android/launcher3/folder/PreviewBackground.java +9 −3 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.animation.AnimatorListenerAdapter; import android.animation.ObjectAnimator; import android.animation.ValueAnimator; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Matrix; Loading Loading @@ -63,6 +64,7 @@ public class PreviewBackground { float mScale = 1f; private float mColorMultiplier = 1f; private int mBgColor; private int mStrokeColor; private int mDotColor; private float mStrokeWidth; private int mStrokeAlpha = MAX_BG_OPACITY; Loading Loading @@ -125,8 +127,12 @@ public class PreviewBackground { public void setup(Context context, ActivityContext activity, View invalidateDelegate, int availableSpaceX, int topPadding) { mInvalidateDelegate = invalidateDelegate; mBgColor = Themes.getAttrColor(context, android.R.attr.colorPrimary); mDotColor = Themes.getAttrColor(context, R.attr.folderDotColor); TypedArray ta = context.getTheme().obtainStyledAttributes(R.styleable.FolderIconPreview); mDotColor = ta.getColor(R.styleable.FolderIconPreview_folderDotColor, 0); mStrokeColor = ta.getColor(R.styleable.FolderIconPreview_folderIconBorderColor, 0); mBgColor = ta.getColor(R.styleable.FolderIconPreview_android_colorPrimary, 0); ta.recycle(); DeviceProfile grid = activity.getDeviceProfile(); previewSize = grid.folderIconSizePx; Loading Loading @@ -275,7 +281,7 @@ public class PreviewBackground { } public void drawBackgroundStroke(Canvas canvas) { mPaint.setColor(setColorAlphaBound(mBgColor, mStrokeAlpha)); mPaint.setColor(setColorAlphaBound(mStrokeColor, mStrokeAlpha)); mPaint.setStyle(Paint.Style.STROKE); mPaint.setStrokeWidth(mStrokeWidth); Loading Loading
res/values/attrs.xml +8 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ <attr name="folderDotColor" format="color" /> <attr name="folderIconRadius" format="float" /> <attr name="folderIconBorderColor" format="color" /> <!-- BubbleTextView specific attributes. --> <declare-styleable name="BubbleTextView"> Loading @@ -52,6 +53,13 @@ <attr name="centerVertically" format="boolean" /> </declare-styleable> <!-- BubbleTextView specific attributes. --> <declare-styleable name="FolderIconPreview"> <attr name="android:colorPrimary" /> <attr name="folderIconBorderColor" /> <attr name="folderDotColor" /> </declare-styleable> <declare-styleable name="ShadowInfo"> <attr name="ambientShadowColor" format="color" /> <attr name="ambientShadowBlur" format="dimension" /> Loading
res/values/styles.xml +4 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ <item name="workspaceStatusBarScrim">@drawable/workspace_bg</item> <item name="widgetsTheme">@style/WidgetContainerTheme</item> <item name="folderDotColor">?android:attr/colorPrimary</item> <item name="folderIconBorderColor">?android:attr/colorPrimary</item> <item name="loadingIconColor">#FFF</item> <item name="android:windowTranslucentStatus">false</item> Loading @@ -60,6 +61,8 @@ <item name="workspaceKeyShadowColor">@android:color/transparent</item> <item name="isWorkspaceDarkText">true</item> <item name="workspaceStatusBarScrim">@null</item> <item name="folderDotColor">#FF464646</item> <item name="folderIconBorderColor">#FF80868B</item> </style> <style name="LauncherTheme.Dark" parent="@style/LauncherTheme"> Loading @@ -77,6 +80,7 @@ <item name="popupColorTertiary">#757575</item> <!-- Gray 600 --> <item name="widgetsTheme">@style/WidgetContainerTheme.Dark</item> <item name="folderDotColor">#FF464646</item> <item name="folderIconBorderColor">#FF80868B</item> <item name="isMainColorDark">true</item> <item name="loadingIconColor">#000</item> </style> Loading
src/com/android/launcher3/folder/PreviewBackground.java +9 −3 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.animation.AnimatorListenerAdapter; import android.animation.ObjectAnimator; import android.animation.ValueAnimator; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Matrix; Loading Loading @@ -63,6 +64,7 @@ public class PreviewBackground { float mScale = 1f; private float mColorMultiplier = 1f; private int mBgColor; private int mStrokeColor; private int mDotColor; private float mStrokeWidth; private int mStrokeAlpha = MAX_BG_OPACITY; Loading Loading @@ -125,8 +127,12 @@ public class PreviewBackground { public void setup(Context context, ActivityContext activity, View invalidateDelegate, int availableSpaceX, int topPadding) { mInvalidateDelegate = invalidateDelegate; mBgColor = Themes.getAttrColor(context, android.R.attr.colorPrimary); mDotColor = Themes.getAttrColor(context, R.attr.folderDotColor); TypedArray ta = context.getTheme().obtainStyledAttributes(R.styleable.FolderIconPreview); mDotColor = ta.getColor(R.styleable.FolderIconPreview_folderDotColor, 0); mStrokeColor = ta.getColor(R.styleable.FolderIconPreview_folderIconBorderColor, 0); mBgColor = ta.getColor(R.styleable.FolderIconPreview_android_colorPrimary, 0); ta.recycle(); DeviceProfile grid = activity.getDeviceProfile(); previewSize = grid.folderIconSizePx; Loading Loading @@ -275,7 +281,7 @@ public class PreviewBackground { } public void drawBackgroundStroke(Canvas canvas) { mPaint.setColor(setColorAlphaBound(mBgColor, mStrokeAlpha)); mPaint.setColor(setColorAlphaBound(mStrokeColor, mStrokeAlpha)); mPaint.setStyle(Paint.Style.STROKE); mPaint.setStrokeWidth(mStrokeWidth); Loading