Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0882d566 authored by Narinder Rana's avatar Narinder Rana
Browse files

update issue color is not changing according to Accent color : imp using XML

parent 27b5317b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 -->
+5 −8
Original line number Diff line number Diff line
@@ -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);
+5 −6
Original line number Diff line number Diff line
@@ -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;
+5 −6
Original line number Diff line number Diff line
@@ -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