diff options
| author | SpiritCroc <spiritcroc@gmail.com> | 2017-05-10 16:12:27 +0200 |
|---|---|---|
| committer | SpiritCroc <spiritcroc@gmail.com> | 2017-05-25 14:33:52 +0200 |
| commit | 15419c3afe40ebf90a8bac8158839cdfcf6c0eaa (patch) | |
| tree | 4687e581924808c29a8a69dd16eb410df308e495 | |
| parent | 5462df5cde9b9fb0a60582715e11540faeb6af5f (diff) | |
Expose hardcoded colors
Change-Id: Ideef1e08d43a595e53913165547325794094030d
25 files changed, 77 insertions, 39 deletions
diff --git a/res/layout-sw600dp/floating_actions.xml b/res/layout-sw600dp/floating_actions.xml index d82642f34..de766f5f8 100644 --- a/res/layout-sw600dp/floating_actions.xml +++ b/res/layout-sw600dp/floating_actions.xml @@ -41,7 +41,7 @@ android:layout_weight="1" android:paddingTop="@dimen/snack_bar_margin_vertical" android:paddingBottom="@dimen/snack_bar_margin_vertical" - android:textColor="@android:color/white" + android:textColor="@color/floating_actions_description_text" style="@style/SnackBarDescriptionTextStyle" /> <TextView @@ -58,4 +58,4 @@ style="@style/SnackBarActionTextStyle" /> </LinearLayout> -</com.android.mail.ui.ActionableToastBar>
\ No newline at end of file +</com.android.mail.ui.ActionableToastBar> diff --git a/res/layout-sw600dp/wait_for_manual_sync.xml b/res/layout-sw600dp/wait_for_manual_sync.xml index 37b555459..b0fcfde77 100644 --- a/res/layout-sw600dp/wait_for_manual_sync.xml +++ b/res/layout-sw600dp/wait_for_manual_sync.xml @@ -20,7 +20,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" - android:background="@android:color/white" + android:background="@color/wait_for_manual_sync_bg" android:padding="@dimen/wait_padding"> <TextView @@ -55,4 +55,4 @@ </LinearLayout> -</LinearLayout>
\ No newline at end of file +</LinearLayout> diff --git a/res/layout/account_feedback_activity.xml b/res/layout/account_feedback_activity.xml index c467c7ccc..d4e8e0340 100644 --- a/res/layout/account_feedback_activity.xml +++ b/res/layout/account_feedback_activity.xml @@ -20,5 +20,5 @@ android:id="@+id/root" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@android:color/white" > + android:background="@color/account_feedback_bg" > </FrameLayout> diff --git a/res/layout/compose_attachment_tile.xml b/res/layout/compose_attachment_tile.xml index 84896b7c7..1721bc915 100644 --- a/res/layout/compose_attachment_tile.xml +++ b/res/layout/compose_attachment_tile.xml @@ -47,7 +47,7 @@ android:id="@+id/attachment_tile_title" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textColor="@android:color/white" + android:textColor="@color/compose_attachment_title" android:includeFontPadding="false" android:textSize="16sp" android:singleLine="true" @@ -60,7 +60,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceSmall" - android:textColor="@android:color/white" + android:textColor="@color/compose_attachment_subtitle" android:includeFontPadding="false" android:textSize="12sp" android:singleLine="true" diff --git a/res/layout/conversation_footer.xml b/res/layout/conversation_footer.xml index f95f20b9f..d19217bb0 100644 --- a/res/layout/conversation_footer.xml +++ b/res/layout/conversation_footer.xml @@ -21,7 +21,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="24dp" - android:background="@android:color/white" > + android:background="@color/conversation_footer_bg" > <include layout="@layout/conversation_view_border" /> diff --git a/res/layout/conversation_message_attachment_bar.xml b/res/layout/conversation_message_attachment_bar.xml index 58a1b7d67..6da8fe25f 100644 --- a/res/layout/conversation_message_attachment_bar.xml +++ b/res/layout/conversation_message_attachment_bar.xml @@ -49,7 +49,7 @@ android:ellipsize="end" android:singleLine="true" android:textAlignment="viewStart" - android:textColor="#333333" + android:textColor="@color/conversation_message_attachment_title" android:textSize="14sp" style="@style/MessageAttachmentBarMarginEndStyle" /> @@ -61,7 +61,7 @@ android:ellipsize="end" android:singleLine="true" android:textAlignment="viewStart" - android:textColor="#aaaaaa" + android:textColor="@color/conversation_message_attachment_subtitle" android:textSize="12sp" style="@style/MessageAttachmentBarMarginEndStyle" /> diff --git a/res/layout/conversation_message_attachment_tile.xml b/res/layout/conversation_message_attachment_tile.xml index d659e4b5f..67f19d5d9 100644 --- a/res/layout/conversation_message_attachment_tile.xml +++ b/res/layout/conversation_message_attachment_tile.xml @@ -49,7 +49,7 @@ android:id="@+id/attachment_tile_title" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textColor="@android:color/black" + android:textColor="@color/conversation_message_attachment_title" android:includeFontPadding="false" android:textSize="16sp" android:singleLine="true" diff --git a/res/layout/conversation_message_footer.xml b/res/layout/conversation_message_footer.xml index cfa306d50..f41a5ef4d 100755 --- a/res/layout/conversation_message_footer.xml +++ b/res/layout/conversation_message_footer.xml @@ -20,7 +20,7 @@ android:id="@+id/attachments" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@android:color/white" + android:background="@color/conversation_message_footer_bg" android:orientation="vertical"> <TextView diff --git a/res/layout/conversation_message_header.xml b/res/layout/conversation_message_header.xml index 77ae717b1..6a679e777 100644 --- a/res/layout/conversation_message_header.xml +++ b/res/layout/conversation_message_header.xml @@ -20,7 +20,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" - android:background="@android:color/white" + android:background="@color/conversation_message_header_bg" android:visibility="visible"> <include layout="@layout/conversation_view_border" diff --git a/res/layout/conversation_pager.xml b/res/layout/conversation_pager.xml index 07d54cfe0..989eeced3 100644 --- a/res/layout/conversation_pager.xml +++ b/res/layout/conversation_pager.xml @@ -21,4 +21,4 @@ android:layout_width="match_parent" android:layout_height="match_parent"> -</com.android.mail.browse.ConversationPager>
\ No newline at end of file +</com.android.mail.browse.ConversationPager> diff --git a/res/layout/conversation_topmost_overlay_items.xml b/res/layout/conversation_topmost_overlay_items.xml index a2fc93804..3e3c57f4e 100644 --- a/res/layout/conversation_topmost_overlay_items.xml +++ b/res/layout/conversation_topmost_overlay_items.xml @@ -50,7 +50,7 @@ android:layout_weight="1" android:paddingTop="@dimen/snack_bar_margin_vertical" android:paddingBottom="@dimen/snack_bar_margin_vertical" - android:textColor="@android:color/white" + android:textColor="@color/conversation_topmost_overlay_items_description_text" style="@style/SnackBarDescriptionTextStyle" /> <TextView diff --git a/res/layout/conversation_view_header.xml b/res/layout/conversation_view_header.xml index 43ddd922b..68d1e672b 100644 --- a/res/layout/conversation_view_header.xml +++ b/res/layout/conversation_view_header.xml @@ -20,7 +20,7 @@ android:id="@+id/conversation_header" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@android:color/white" + android:background="@color/conversation_view_header_bg" android:orientation="horizontal" android:minHeight="88sp" android:paddingTop="16dp" diff --git a/res/layout/floating_actions.xml b/res/layout/floating_actions.xml index 4c1d935bc..75f899c74 100644 --- a/res/layout/floating_actions.xml +++ b/res/layout/floating_actions.xml @@ -48,7 +48,7 @@ android:layout_weight="1" android:paddingTop="@dimen/snack_bar_margin_vertical" android:paddingBottom="@dimen/snack_bar_margin_vertical" - android:textColor="@android:color/white" + android:textColor="@color/floating_actions_description_text" style="@style/SnackBarDescriptionTextStyle" /> <TextView @@ -76,7 +76,7 @@ android:layout_marginLeft="@dimen/snack_bar_margin_horizontal" android:layout_marginRight="@dimen/snack_bar_margin_horizontal" android:paddingTop="@dimen/snack_bar_margin_vertical" - android:textColor="@android:color/white" /> + android:textColor="@color/floating_actions_description_text" /> <TextView android:id="@+id/multiline_action_text" @@ -92,4 +92,4 @@ </com.android.mail.ui.ActionableToastBar> -</LinearLayout>
\ No newline at end of file +</LinearLayout> diff --git a/res/layout/mail_actionbar_searchview.xml b/res/layout/mail_actionbar_searchview.xml index b65620c3d..201348ab1 100644 --- a/res/layout/mail_actionbar_searchview.xml +++ b/res/layout/mail_actionbar_searchview.xml @@ -22,7 +22,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:alpha="0" - android:background="@android:color/white" + android:background="@color/mail_actionbar_searchview_bg" android:visibility="gone"> <ImageView @@ -60,4 +60,4 @@ android:background="?attr/selectableItemBackgroundBorderless" android:scaleType="center" /> -</com.android.mail.ui.MaterialSearchActionView>
\ No newline at end of file +</com.android.mail.ui.MaterialSearchActionView> diff --git a/res/layout/search_suggestion_list.xml b/res/layout/search_suggestion_list.xml index 076b74fa2..7ae85b4eb 100644 --- a/res/layout/search_suggestion_list.xml +++ b/res/layout/search_suggestion_list.xml @@ -29,7 +29,7 @@ android:id="@+id/search_overlay_suggestion_list" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@android:color/white" + android:background="@color/search_suggestion_list_bg" android:divider="@null" android:nextFocusUp="@+id/search_actionbar_query_text" /> @@ -39,6 +39,6 @@ android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" - android:background="#33000000" /> + android:background="@color/search_suggestion_list_fade_bg" /> -</com.android.mail.ui.MaterialSearchSuggestionsList>
\ No newline at end of file +</com.android.mail.ui.MaterialSearchSuggestionsList> diff --git a/res/layout/swipe_leavebehind_body.xml b/res/layout/swipe_leavebehind_body.xml index 106c7e8ae..575ad25b2 100644 --- a/res/layout/swipe_leavebehind_body.xml +++ b/res/layout/swipe_leavebehind_body.xml @@ -28,7 +28,7 @@ android:ellipsize="end" android:singleLine="true" android:gravity="center_vertical" - android:textColor="@android:color/white" + android:textColor="@color/swipe_leavebehind_body_text" android:textSize="16sp" style="@style/UndoDescriptionStyle" /> diff --git a/res/layout/two_pane_activity.xml b/res/layout/two_pane_activity.xml index de1e21f8e..33b5b564d 100644 --- a/res/layout/two_pane_activity.xml +++ b/res/layout/two_pane_activity.xml @@ -34,7 +34,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:foregroundGravity="fill_horizontal|top" - android:background="@android:color/white"> + android:background="@color/two_pane_bg"> <FrameLayout android:id="@+id/drawer" diff --git a/res/layout/wait_default.xml b/res/layout/wait_default.xml index 8590ad857..1fb02f862 100644 --- a/res/layout/wait_default.xml +++ b/res/layout/wait_default.xml @@ -19,7 +19,7 @@ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@android:color/white" + android:background="@color/wait_default_bg" android:padding="@dimen/wait_padding"> <TextView diff --git a/res/layout/wait_for_manual_sync.xml b/res/layout/wait_for_manual_sync.xml index 0748a44a2..adf67a4ef 100644 --- a/res/layout/wait_for_manual_sync.xml +++ b/res/layout/wait_for_manual_sync.xml @@ -20,7 +20,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" - android:background="@android:color/white" + android:background="@color/wait_for_manual_sync_bg" android:padding="@dimen/wait_padding"> <TextView diff --git a/res/layout/widget.xml b/res/layout/widget.xml index f59655f10..2d466f1be 100644 --- a/res/layout/widget.xml +++ b/res/layout/widget.xml @@ -69,7 +69,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/tap_to_configure" - android:textColor="@android:color/black" + android:textColor="@color/widget_text_black" android:textSize="16sp" android:textStyle="bold"/> </LinearLayout> @@ -88,7 +88,7 @@ android:layout_weight="1" android:gravity="center" android:text="@string/loading_conversations" - android:textColor="@android:color/black" + android:textColor="@color/widget_text_black" android:textSize="16sp" android:textStyle="bold" android:background="@drawable/gradient_bg_widget_holo" @@ -108,7 +108,7 @@ android:layout_height="wrap_content" android:layout_marginBottom="16dip" android:text="@string/non_synced_folder_description" - android:textColor="@android:color/black" + android:textColor="@color/widget_text_black" android:textSize="16sp" /> <TextView android:layout_width="match_parent" @@ -116,8 +116,8 @@ android:paddingTop="8dip" android:paddingBottom="8dip" android:text="@string/tap_to_configure_folder_sync" - android:textColor="@android:color/black" - android:background="@android:color/darker_gray" + android:textColor="@color/widget_text_black" + android:background="@color/widget_tap_to_configure_folder_sync_bg" android:gravity="center" android:textSize="16sp" android:textStyle="bold"/> diff --git a/res/layout/widget_loading.xml b/res/layout/widget_loading.xml index b3cde7b5e..0687ffa72 100644 --- a/res/layout/widget_loading.xml +++ b/res/layout/widget_loading.xml @@ -27,7 +27,7 @@ android:layout_width="match_parent" android:layout_marginLeft="16dip" android:gravity="center" - android:textColor="@android:color/black" + android:textColor="@color/widget_loading_text" android:textSize="14sp" android:textStyle="bold" /> -</FrameLayout>
\ No newline at end of file +</FrameLayout> diff --git a/res/values/aicp_colors.xml b/res/values/aicp_colors.xml new file mode 100644 index 000000000..519728c99 --- /dev/null +++ b/res/values/aicp_colors.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?> + +<resources> + <color name="drawer_icon_active">#ff000000</color> + + <color name="wait_for_manual_sync_bg">@android:color/white</color> + <color name="wait_default_bg">@android:color/white</color> + <color name="mail_actionbar_searchview_bg">@android:color/white</color> + <color name="conversation_footer_bg">@android:color/white</color> + <color name="conversation_message_header_bg">@android:color/white</color> + <color name="conversation_message_footer_bg">@android:color/white</color> + <color name="conversation_view_header_bg">@android:color/white</color> + <color name="account_feedback_bg">@android:color/white</color> + <color name="search_suggestion_list_bg">@android:color/white</color> + <color name="search_suggestion_list_fade_bg">#33000000</color> + <color name="two_pane_bg">@android:color/white</color> + + <color name="conversation_message_attachment_title">#333333</color> + <color name="conversation_message_attachment_subtitle">#aaaaaa</color> + + <color name="swipe_leavebehind_body_text">@android:color/white</color> + <color name="floating_actions_description_text">@android:color/white</color> + <color name="conversation_topmost_overlay_items_description_text">@android:color/white</color> + <color name="conversation_message_attachment_title">@android:color/black</color> + <color name="compose_attachment_title">@android:color/white</color> + <color name="compose_attachment_subtitle">@android:color/white</color> + + <color name="buttery_progress_bar">@android:color/holo_blue_light</color> + <color name="material_search_action_view_light_bg">@android:color/white</color> + <color name="material_search_action_view_dark_bg_text">@android:color/white</color> + + <color name="widget_text_black">@android:color/black</color> + <color name="widget_loading_text">@android:color/black</color> + <color name="widget_tap_to_configure_folder_sync_bg">@android:color/darker_gray</color> + +</resources> + diff --git a/src/com/android/mail/providers/Folder.java b/src/com/android/mail/providers/Folder.java index bd701a10c..97c2df601 100644 --- a/src/com/android/mail/providers/Folder.java +++ b/src/com/android/mail/providers/Folder.java @@ -670,7 +670,8 @@ public class Folder implements Parcelable, Comparable<Folder> { final Drawable activatedIconDrawable = iconView.getResources().getDrawable(icon); - activatedIconDrawable.mutate().setColorFilter(0xff000000, + activatedIconDrawable.mutate().setColorFilter( + iconView.getResources().getColor(R.color.drawer_icon_active), PorterDuff.Mode.MULTIPLY); listDrawable.addState(ACTIVATED_STATE_LIST, activatedIconDrawable); diff --git a/src/com/android/mail/ui/ButteryProgressBar.java b/src/com/android/mail/ui/ButteryProgressBar.java index abf0214e3..311157737 100644 --- a/src/com/android/mail/ui/ButteryProgressBar.java +++ b/src/com/android/mail/ui/ButteryProgressBar.java @@ -88,7 +88,7 @@ public class ButteryProgressBar extends View { final TypedArray ta = c.obtainStyledAttributes(attrs, R.styleable.ButteryProgressBar); try { mBarColor = ta.getColor(R.styleable.ButteryProgressBar_barColor, - c.getResources().getColor(android.R.color.holo_blue_light)); + c.getResources().getColor(R.color.buttery_progress_bar)); mSolidBarHeight = ta.getDimensionPixelSize( R.styleable.ButteryProgressBar_barHeight, Math.round(DEFAULT_BAR_HEIGHT_DP * mDensity)); diff --git a/src/com/android/mail/ui/MaterialSearchActionView.java b/src/com/android/mail/ui/MaterialSearchActionView.java index 7b248ce84..5e1dec381 100644 --- a/src/com/android/mail/ui/MaterialSearchActionView.java +++ b/src/com/android/mail/ui/MaterialSearchActionView.java @@ -77,7 +77,7 @@ public class MaterialSearchActionView extends LinearLayout implements TextWatche super(context, attrs); final Resources res = getResources(); - mLightBgDrawable = new ColorDrawable(res.getColor(android.R.color.white)); + mLightBgDrawable = new ColorDrawable(res.getColor(R.color.material_search_action_view_light_bg)); mDarkBgDrawable = new ColorDrawable(res.getColor(R.color.primary_color)); mLightBgBackDrawable = R.drawable.ic_arrow_back_24dp_with_rtl; mDarkBgBackDrawable = R.drawable.ic_arrow_back_wht_24dp_with_rtl; @@ -86,7 +86,7 @@ public class MaterialSearchActionView extends LinearLayout implements TextWatche mLightBgVoiceDrawable = R.drawable.ic_mic_24dp; mDarkBgVoiceDrawable = R.drawable.ic_mic_wht_24dp; mLightBgTextColor = res.getColor(R.color.search_query_text); - mDarkBgTextColor = res.getColor(android.R.color.white); + mDarkBgTextColor = res.getColor(R.color.material_search_action_view_dark_bg_text); } // PUBLIC API |
