diff options
author | Andrew Sapperstein <asapperstein@google.com> | 2016-06-20 12:48:22 -0700 |
---|---|---|
committer | Andrew Sapperstein <asapperstein@google.com> | 2016-06-30 14:17:19 -0700 |
commit | 5f7750d75c83b13facf57988e1f042ce8af9abd6 (patch) | |
tree | b5ae3fe17a2ce8de81bf56ff33ffeb4d0af17573 /src/com/android/launcher3/IconCache.java | |
parent | 26def23702881867208bfc465af27a4f9afc26f6 (diff) | |
download | android_packages_apps_Trebuchet-5f7750d75c83b13facf57988e1f042ce8af9abd6.tar.gz android_packages_apps_Trebuchet-5f7750d75c83b13facf57988e1f042ce8af9abd6.tar.bz2 android_packages_apps_Trebuchet-5f7750d75c83b13facf57988e1f042ce8af9abd6.zip |
Use colorSecondary for darker bg color.
Used for widget headers and a few other places.
In order to support pre-API 25, an app-local version of colorSecondary
is created and used throughout the app. A new WidgetContainerTheme
sets colorSecondary to a canned value. On API 25+, colorSecondary
is set to the platform value.
Change-Id: Ie0dd66333052b7346eea5d82d1c88417c6a2cd00
Fixes: 28625102
Diffstat (limited to 'src/com/android/launcher3/IconCache.java')
-rw-r--r-- | src/com/android/launcher3/IconCache.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/launcher3/IconCache.java b/src/com/android/launcher3/IconCache.java index ac9a8aae5..1fea6b4dc 100644 --- a/src/com/android/launcher3/IconCache.java +++ b/src/com/android/launcher3/IconCache.java @@ -26,6 +26,7 @@ import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; import android.content.res.Resources; +import android.content.res.TypedArray; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteException; @@ -126,7 +127,9 @@ public class IconCache { mWorkerHandler = new Handler(LauncherModel.getWorkerLooper()); mActivityBgColor = context.getResources().getColor(R.color.quantum_panel_bg_color); - mPackageBgColor = context.getResources().getColor(R.color.quantum_panel_bg_color_dark); + TypedArray ta = context.obtainStyledAttributes(new int[]{R.attr.colorSecondary}); + mPackageBgColor = ta.getColor(0, 0); + ta.recycle(); mLowResOptions = new BitmapFactory.Options(); // Always prefer RGB_565 config for low res. If the bitmap has transparency, it will // automatically be loaded as ALPHA_8888. |