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

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

Fix accent color

parent 670b0f4e
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -40,12 +40,14 @@
    <!-- Color of the status bar above the contextual selection bar. -->
    <!-- Color of the status bar above the contextual selection bar. -->
    <color name="contextual_selection_bar_status_bar_color">#bababa</color>
    <color name="contextual_selection_bar_status_bar_color">#bababa</color>


    <color name="primary_color_dark">#1c3aa9</color>
 <!--   <color name="primary_color_dark">#1c3aa9</color>
    <color name="primary_color">#2a56c6</color>
    <color name="primary_color">#2a56c6</color>-->
 <color name="primary_color_dark">@*android:color/accent_device_default</color>
    <color name="primary_color">@*android:color/accent_device_default</color>


    <color name="group_primary_color_dark">#546E7A</color>
    <color name="group_primary_color_dark">#546E7A</color>
    <color name="group_primary_color">#607D8B</color>
    <color name="group_primary_color">#607D8B</color>

    <color name="accent">@*android:color/accent_device_default</color>
    <!-- Color of the selected tab underline -->
    <!-- Color of the selected tab underline -->
    <color name="contacts_accent_color">#FFFFFF</color>
    <color name="contacts_accent_color">#FFFFFF</color>


+10 −7
Original line number Original line Diff line number Diff line
@@ -1306,13 +1306,16 @@ public class PeopleActivity extends AppCompatContactsActivity implements
     * */
     * */


    private int fetchAccentColor() {
    private int fetchAccentColor() {
        TypedValue typedValue = new TypedValue();
        int color=getResources().getColor(R.color.accent);
        TypedArray a = this.obtainStyledAttributes(typedValue.data, new int[] { R.attr.colorAccent });
//        TypedValue typedValue = new TypedValue();
        int color = a.getColor(0, 0);
//        TypedArray a = this.obtainStyledAttributes(typedValue.data, new int[] { R.attr.colorAccent });
        a.recycle();
//        int color = a.getColor(0, 0);
        Log.e("TAG", "accent Colour  #"+Integer.toHexString(color));
//        a.recycle();
        getSupportActionBar().setBackgroundDrawable(
//        Log.e("TAG", "accent Colour  #"+Integer.toHexString(color));
                new ColorDrawable(color));
//        getSupportActionBar().setBackgroundDrawable(
//                new ColorDrawable(color));


        return color;
        return color;
    }
    }