Loading res/values/colors.xml +5 −3 Original line number Diff line number Diff line Loading @@ -40,12 +40,14 @@ <!-- Color of the status bar above the contextual selection bar. --> <color name="contextual_selection_bar_status_bar_color">#bababa</color> <color name="primary_color_dark">#1c3aa9</color> <color name="primary_color">#2a56c6</color> <!-- <color name="primary_color_dark">#1c3aa9</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">#607D8B</color> <color name="accent">@*android:color/accent_device_default</color> <!-- Color of the selected tab underline --> <color name="contacts_accent_color">#FFFFFF</color> Loading src/com/android/contacts/activities/PeopleActivity.java +10 −7 Original line number Diff line number Diff line Loading @@ -1306,13 +1306,16 @@ public class PeopleActivity extends AppCompatContactsActivity implements * */ private int fetchAccentColor() { TypedValue typedValue = new TypedValue(); TypedArray a = this.obtainStyledAttributes(typedValue.data, new int[] { R.attr.colorAccent }); int color = a.getColor(0, 0); a.recycle(); Log.e("TAG", "accent Colour #"+Integer.toHexString(color)); getSupportActionBar().setBackgroundDrawable( new ColorDrawable(color)); int color=getResources().getColor(R.color.accent); // TypedValue typedValue = new TypedValue(); // TypedArray a = this.obtainStyledAttributes(typedValue.data, new int[] { R.attr.colorAccent }); // int color = a.getColor(0, 0); // a.recycle(); // Log.e("TAG", "accent Colour #"+Integer.toHexString(color)); // getSupportActionBar().setBackgroundDrawable( // new ColorDrawable(color)); return color; } Loading Loading
res/values/colors.xml +5 −3 Original line number Diff line number Diff line Loading @@ -40,12 +40,14 @@ <!-- Color of the status bar above the contextual selection bar. --> <color name="contextual_selection_bar_status_bar_color">#bababa</color> <color name="primary_color_dark">#1c3aa9</color> <color name="primary_color">#2a56c6</color> <!-- <color name="primary_color_dark">#1c3aa9</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">#607D8B</color> <color name="accent">@*android:color/accent_device_default</color> <!-- Color of the selected tab underline --> <color name="contacts_accent_color">#FFFFFF</color> Loading
src/com/android/contacts/activities/PeopleActivity.java +10 −7 Original line number Diff line number Diff line Loading @@ -1306,13 +1306,16 @@ public class PeopleActivity extends AppCompatContactsActivity implements * */ private int fetchAccentColor() { TypedValue typedValue = new TypedValue(); TypedArray a = this.obtainStyledAttributes(typedValue.data, new int[] { R.attr.colorAccent }); int color = a.getColor(0, 0); a.recycle(); Log.e("TAG", "accent Colour #"+Integer.toHexString(color)); getSupportActionBar().setBackgroundDrawable( new ColorDrawable(color)); int color=getResources().getColor(R.color.accent); // TypedValue typedValue = new TypedValue(); // TypedArray a = this.obtainStyledAttributes(typedValue.data, new int[] { R.attr.colorAccent }); // int color = a.getColor(0, 0); // a.recycle(); // Log.e("TAG", "accent Colour #"+Integer.toHexString(color)); // getSupportActionBar().setBackgroundDrawable( // new ColorDrawable(color)); return color; } Loading