Loading res/values/colors.xml +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ <color name="app_background_color">@android:color/white</color> <color name="background_floating">@android:color/white</color> <color name="nav_bar_translucent">#99FFFFFF</color> <color name="accent">@*android:color/accent_device_default</color> <color name="primary">#1E88E5</color> <!-- Blue 600 --> <color name="secondary">#E3F2FD</color> <!-- Blue 50 --> <color name="hairline">#E0E0E0</color> <!-- Gray 300 --> Loading src/com/android/documentsui/BaseActivity.java +5 −8 Original line number Diff line number Diff line Loading @@ -902,14 +902,11 @@ public abstract class BaseActivity * */ private int fetchAccentColor() { TypedValue typedValue = new TypedValue(); ContextThemeWrapper contextThemeWrapper = new ContextThemeWrapper(this, android.R.style.Theme_DeviceDefault_Light); contextThemeWrapper.getTheme().resolveAttribute(android.R.attr.colorAccent, typedValue, true); int color = typedValue.data; int color=getResources().getColor(R.color.accent); /* TypedValue typedValue = new TypedValue(); TypedArray a = activity.obtainStyledAttributes(typedValue.data, new int[] { R.attr.colorAccent }); int color = a.getColor(0, 0); a.recycle();*/ Log.e("TAG", "accent Colour #"+Integer.toHexString(color)); //toolbar change color to accent color toolbar.setBackgroundColor(color); Loading src/com/android/documentsui/DrawerController.java +5 −6 Original line number Diff line number Diff line Loading @@ -264,12 +264,11 @@ public abstract class DrawerController implements DrawerListener { * */ private static int fetchAccentColor(Activity activity) { TypedValue typedValue = new TypedValue(); ContextThemeWrapper contextThemeWrapper = new ContextThemeWrapper(activity, android.R.style.Theme_DeviceDefault_Light); contextThemeWrapper.getTheme().resolveAttribute(android.R.attr.colorAccent, typedValue, true); int color = typedValue.data; int color=activity.getResources().getColor(R.color.accent); /* TypedValue typedValue = new TypedValue(); TypedArray a = activity.obtainStyledAttributes(typedValue.data, new int[] { R.attr.colorAccent }); int color = a.getColor(0, 0); a.recycle();*/ Log.e("TAG", "accent Colour #"+Integer.toHexString(color)); //toolbar change color to accent color return color; Loading src/com/android/documentsui/files/LauncherActivity.java +5 −6 Original line number Diff line number Diff line Loading @@ -180,12 +180,11 @@ public class LauncherActivity extends Activity { * */ private int fetchAccentColor() { TypedValue typedValue = new TypedValue(); ContextThemeWrapper contextThemeWrapper = new ContextThemeWrapper(this, android.R.style.Theme_DeviceDefault_Light); contextThemeWrapper.getTheme().resolveAttribute(android.R.attr.colorAccent, typedValue, true); int color = typedValue.data; int color=getResources().getColor(R.color.accent); /* TypedValue typedValue = new TypedValue(); TypedArray a = activity.obtainStyledAttributes(typedValue.data, new int[] { R.attr.colorAccent }); int color = a.getColor(0, 0); a.recycle();*/ Log.e("TAG", "accent Colour #"+Integer.toHexString(color)); //toolbar change color to accent color Loading Loading
res/values/colors.xml +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ <color name="app_background_color">@android:color/white</color> <color name="background_floating">@android:color/white</color> <color name="nav_bar_translucent">#99FFFFFF</color> <color name="accent">@*android:color/accent_device_default</color> <color name="primary">#1E88E5</color> <!-- Blue 600 --> <color name="secondary">#E3F2FD</color> <!-- Blue 50 --> <color name="hairline">#E0E0E0</color> <!-- Gray 300 --> Loading
src/com/android/documentsui/BaseActivity.java +5 −8 Original line number Diff line number Diff line Loading @@ -902,14 +902,11 @@ public abstract class BaseActivity * */ private int fetchAccentColor() { TypedValue typedValue = new TypedValue(); ContextThemeWrapper contextThemeWrapper = new ContextThemeWrapper(this, android.R.style.Theme_DeviceDefault_Light); contextThemeWrapper.getTheme().resolveAttribute(android.R.attr.colorAccent, typedValue, true); int color = typedValue.data; int color=getResources().getColor(R.color.accent); /* TypedValue typedValue = new TypedValue(); TypedArray a = activity.obtainStyledAttributes(typedValue.data, new int[] { R.attr.colorAccent }); int color = a.getColor(0, 0); a.recycle();*/ Log.e("TAG", "accent Colour #"+Integer.toHexString(color)); //toolbar change color to accent color toolbar.setBackgroundColor(color); Loading
src/com/android/documentsui/DrawerController.java +5 −6 Original line number Diff line number Diff line Loading @@ -264,12 +264,11 @@ public abstract class DrawerController implements DrawerListener { * */ private static int fetchAccentColor(Activity activity) { TypedValue typedValue = new TypedValue(); ContextThemeWrapper contextThemeWrapper = new ContextThemeWrapper(activity, android.R.style.Theme_DeviceDefault_Light); contextThemeWrapper.getTheme().resolveAttribute(android.R.attr.colorAccent, typedValue, true); int color = typedValue.data; int color=activity.getResources().getColor(R.color.accent); /* TypedValue typedValue = new TypedValue(); TypedArray a = activity.obtainStyledAttributes(typedValue.data, new int[] { R.attr.colorAccent }); int color = a.getColor(0, 0); a.recycle();*/ Log.e("TAG", "accent Colour #"+Integer.toHexString(color)); //toolbar change color to accent color return color; Loading
src/com/android/documentsui/files/LauncherActivity.java +5 −6 Original line number Diff line number Diff line Loading @@ -180,12 +180,11 @@ public class LauncherActivity extends Activity { * */ private int fetchAccentColor() { TypedValue typedValue = new TypedValue(); ContextThemeWrapper contextThemeWrapper = new ContextThemeWrapper(this, android.R.style.Theme_DeviceDefault_Light); contextThemeWrapper.getTheme().resolveAttribute(android.R.attr.colorAccent, typedValue, true); int color = typedValue.data; int color=getResources().getColor(R.color.accent); /* TypedValue typedValue = new TypedValue(); TypedArray a = activity.obtainStyledAttributes(typedValue.data, new int[] { R.attr.colorAccent }); int color = a.getColor(0, 0); a.recycle();*/ Log.e("TAG", "accent Colour #"+Integer.toHexString(color)); //toolbar change color to accent color Loading