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

Commit abff6696 authored by narinder Rana's avatar narinder Rana Committed by Romain Hunault
Browse files

Fix accent color

parent 7f9ff793
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -26,8 +26,12 @@

    <color name="primary_dark">#ff254FAE</color>
    <color name="primary">@*android:color/Blue_700</color>
    <color name="accent">@*android:color/Blue_700</color>
<!--    <color name="accent">@*android:color/Blue_700</color>-->
    <color name="accent">@*android:color/accent_device_default_dark</color>
    <color name="accent_dark">@*android:color/accent_device_default_dark</color>
<!--    <color name="accent_dark">@*android:color/accent_device_default_dark</color>-->



    <color name="text_cursor">@*android:color/white</color>
    <color name="text_handle">#FF82B1FF</color>     <!--Blue A100-->
+7 −6
Original line number Diff line number Diff line
@@ -691,13 +691,14 @@ 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 change color to accent color
        toolbar.setBackgroundColor(color);
        //change status bar color
+6 −6
Original line number Diff line number Diff line
@@ -272,14 +272,14 @@ 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
@@ -176,12 +176,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