diff options
author | Clark Scheff <clark@cyngn.com> | 2015-01-27 18:22:04 -0800 |
---|---|---|
committer | Clark Scheff <clark@cyngn.com> | 2015-10-28 15:31:37 -0700 |
commit | da66a726eb6cccb4f8e1586af99a487ab635d3b7 (patch) | |
tree | aa85e9fb3ec9c6d30e815f12f984a7609b1bc9d2 | |
parent | a674c562ff8fcf3c0c0597c9463fefe2edfeb7f2 (diff) | |
download | packages_apps_Settings-da66a726eb6cccb4f8e1586af99a487ab635d3b7.tar.gz packages_apps_Settings-da66a726eb6cccb4f8e1586af99a487ab635d3b7.tar.bz2 packages_apps_Settings-da66a726eb6cccb4f8e1586af99a487ab635d3b7.zip |
Expose hardcoded and @android colors from layouts
This will allow theme designers better flexibility with the themes
they design for Settings. There are probably other resources we
need to expose but this is a good start.
Change-Id: I81254f72cd2d47bc05a7f15c8e3a9fb4c89c8be8
20 files changed, 72 insertions, 32 deletions
diff --git a/res/layout-land/choose_lock_password.xml b/res/layout-land/choose_lock_password.xml index f79de614c..c75a5b3ff 100644 --- a/res/layout-land/choose_lock_password.xml +++ b/res/layout-land/choose_lock_password.xml @@ -67,7 +67,7 @@ android:layout_alignParentBottom="true" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="#00000000" + android:background="@color/background_color_transparent" android:keyBackground="@*android:drawable/btn_keyboard_key_fulltrans" android:visibility="gone" /> diff --git a/res/layout-land/confirm_lock_password.xml b/res/layout-land/confirm_lock_password.xml index 0d46bfa94..ba6596833 100644 --- a/res/layout-land/confirm_lock_password.xml +++ b/res/layout-land/confirm_lock_password.xml @@ -90,4 +90,4 @@ android:visibility="gone"/> </FrameLayout> -</LinearLayout>
\ No newline at end of file +</LinearLayout> diff --git a/res/layout-sw600dp-land/choose_lock_password.xml b/res/layout-sw600dp-land/choose_lock_password.xml index 199c9ac4c..d597beb96 100644 --- a/res/layout-sw600dp-land/choose_lock_password.xml +++ b/res/layout-sw600dp-land/choose_lock_password.xml @@ -82,7 +82,7 @@ android:layout_alignParentBottom="true" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="#00000000" + android:background="@color/background_color_transparent" android:keyBackground="@*android:drawable/btn_keyboard_key_fulltrans" android:visibility="gone" /> diff --git a/res/layout-sw600dp/choose_lock_password.xml b/res/layout-sw600dp/choose_lock_password.xml index ca8975ee5..b39caf35b 100644 --- a/res/layout-sw600dp/choose_lock_password.xml +++ b/res/layout-sw600dp/choose_lock_password.xml @@ -56,7 +56,7 @@ android:layout_alignParentBottom="true" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="#00000000" + android:background="@color/background_color_transparent" android:layout_marginBottom="30dip" android:keyBackground="@*android:drawable/btn_keyboard_key_fulltrans" android:visibility="gone" diff --git a/res/layout/bluetooth_pin_confirm.xml b/res/layout/bluetooth_pin_confirm.xml index ebdf65de7..e1104d501 100644 --- a/res/layout/bluetooth_pin_confirm.xml +++ b/res/layout/bluetooth_pin_confirm.xml @@ -40,7 +40,7 @@ android:text="@string/bluetooth_pairing_key_msg" android:visibility="gone" android:textAppearance="@android:style/TextAppearance.Material.Body1" - android:textColor="@*android:color/secondary_text_material_light" /> + android:textColor="@color/text_color_secondary_text_material_light" /> <TextView android:id="@+id/pairing_subhead" @@ -63,7 +63,7 @@ android:gravity="center_vertical" android:text="@string/bluetooth_enter_passkey_msg" android:textAppearance="@android:style/TextAppearance.Material.Subhead" - android:textColor="@*android:color/secondary_text_material_light" + android:textColor="@color/text_color_secondary_text_material_light" android:visibility="gone" /> <CheckBox @@ -73,7 +73,7 @@ android:layout_marginStart="@dimen/bluetooth_dialog_padding" android:layout_marginEnd="@dimen/bluetooth_dialog_padding" android:textAppearance="@android:style/TextAppearance.Material.Body1" - android:textColor="@*android:color/secondary_text_material_light" /> + android:textColor="@color/text_color_secondary_text_material_light" /> </LinearLayout> diff --git a/res/layout/bluetooth_pin_entry.xml b/res/layout/bluetooth_pin_entry.xml index aa9f18774..c3ff65942 100644 --- a/res/layout/bluetooth_pin_entry.xml +++ b/res/layout/bluetooth_pin_entry.xml @@ -85,7 +85,7 @@ android:layout_marginEnd="@dimen/bluetooth_dialog_padding" android:gravity="center_vertical" android:textAppearance="@android:style/TextAppearance.Material.Subhead" - android:textColor="@*android:color/secondary_text_material_light"/> + android:textColor="@color/text_color_secondary_text_material_light"/> <CheckBox android:id="@+id/phonebook_sharing_message_entry_pin" diff --git a/res/layout/choose_lock_password.xml b/res/layout/choose_lock_password.xml index c13d150c8..8894b1eea 100644 --- a/res/layout/choose_lock_password.xml +++ b/res/layout/choose_lock_password.xml @@ -71,7 +71,7 @@ android:layout_alignParentBottom="true" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="#00000000" + android:background="@color/background_color_transparent" android:keyBackground="@*android:drawable/btn_keyboard_key_fulltrans" android:visibility="gone" /> diff --git a/res/layout/credentials_disallowed_preference_screen.xml b/res/layout/credentials_disallowed_preference_screen.xml index c4e8934c2..8a51dc2ca 100644 --- a/res/layout/credentials_disallowed_preference_screen.xml +++ b/res/layout/credentials_disallowed_preference_screen.xml @@ -26,8 +26,8 @@ android:layout_height="match_parent" android:drawSelectorOnTop="false" android:scrollbarStyle="insideOverlay" - android:background="@android:color/white" - android:cacheColorHint="@android:color/white" + android:background="@color/background_color_white" + android:cacheColorHint="@color/background_color_white" android:fadingEdgeLength="16dip" /> <TextView android:id="@android:id/empty" diff --git a/res/layout/crypt_keeper_emergency_button.xml b/res/layout/crypt_keeper_emergency_button.xml index 0b6f810b6..791efdb02 100644 --- a/res/layout/crypt_keeper_emergency_button.xml +++ b/res/layout/crypt_keeper_emergency_button.xml @@ -33,7 +33,7 @@ android:layout_gravity="center_horizontal" android:textSize="14sp" android:fontFamily="sans-serif" - android:textColor="#FFFFFF" + android:textColor="@color/text_color_white" style="?android:attr/borderlessButtonStyle" /> </LinearLayout> diff --git a/res/layout/crypt_keeper_status.xml b/res/layout/crypt_keeper_status.xml index bddff1ad5..c07a70b8d 100644 --- a/res/layout/crypt_keeper_status.xml +++ b/res/layout/crypt_keeper_status.xml @@ -35,7 +35,7 @@ android:layout_marginEnd="8dip" android:textSize="16sp" android:fontFamily="sans-serif" - android:textColor="@android:color/white" + android:textColor="@color/text_color_white" android:text="@string/enter_password" android:layout_gravity="center_horizontal" android:gravity="center_horizontal" /> @@ -52,7 +52,7 @@ android:marqueeRepeatLimit ="marquee_forever" android:textSize="16sp" android:fontFamily="sans-serif" - android:textColor="#B3FFFFFF" + android:textColor="@color/text_color_translucent_white" android:gravity="center_horizontal" /> </LinearLayout> diff --git a/res/layout/dashboard_category.xml b/res/layout/dashboard_category.xml index bee063e6e..1ceeebf0b 100644 --- a/res/layout/dashboard_category.xml +++ b/res/layout/dashboard_category.xml @@ -21,7 +21,7 @@ android:paddingStart="@dimen/dashboard_category_padding_start" android:paddingEnd="@dimen/dashboard_category_padding_end" android:orientation="vertical" - android:background="@color/card_background" + android:background="@color/dashboard_category_background_color" android:layout_marginBottom="8dip" android:elevation="@dimen/dashboard_category_elevation"> diff --git a/res/layout/data_usage_chart.xml b/res/layout/data_usage_chart.xml index 648c7f8d7..998bb845c 100644 --- a/res/layout/data_usage_chart.xml +++ b/res/layout/data_usage_chart.xml @@ -42,9 +42,9 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="start|bottom" - settings:strokeColor="#00000000" - settings:fillColor="?android:attr/colorAccent" - settings:fillColorSecondary="#ff80cbc4" + settings:strokeColor="@color/data_usage_stroke_color" + settings:fillColor="@color/data_usage_fill_color" + settings:fillColorSecondary="@color/data_usage_secondary_fill_color" settings:safeRegion="3dp" /> <com.android.settings.widget.ChartNetworkSeriesView @@ -52,9 +52,9 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="start|bottom" - settings:strokeColor="#00000000" - settings:fillColor="?android:attr/colorAccent" - settings:fillColorSecondary="?android:attr/colorAccent" + settings:strokeColor="@color/data_usage_stroke_color" + settings:fillColor="@color/data_usage_fill_color" + settings:fillColorSecondary="@color/data_usage_fill_color" settings:safeRegion="3dp" /> <com.android.settings.widget.ChartSweepView @@ -67,7 +67,7 @@ settings:neighborMargin="5dip" settings:labelSize="60dip" settings:labelTemplate="@string/data_usage_sweep_warning" - settings:labelColor="?android:attr/textColorSecondary" + settings:labelColor="@color/data_usage_label_color" settings:safeRegion="4dp" /> <com.android.settings.widget.ChartSweepView @@ -80,7 +80,7 @@ settings:neighborMargin="5dip" settings:labelSize="60dip" settings:labelTemplate="@string/data_usage_sweep_limit" - settings:labelColor="#fff4511e" + settings:labelColor="@color/data_usage_secondary_label_color" settings:safeRegion="4dp" /> </com.android.settings.widget.ChartDataUsageView> diff --git a/res/layout/keyguard_appwidget_picker_layout.xml b/res/layout/keyguard_appwidget_picker_layout.xml index e53367285..3b63960eb 100644 --- a/res/layout/keyguard_appwidget_picker_layout.xml +++ b/res/layout/keyguard_appwidget_picker_layout.xml @@ -28,6 +28,6 @@ android:layout_weight="1" android:numColumns="@integer/keyguard_appwidget_picker_cols" android:layout_gravity="center_horizontal" - android:listSelector="@android:color/transparent" + android:listSelector="@color/background_color_transparent" android:id="@+id/widget_list" /> </LinearLayout> diff --git a/res/layout/master_clear_disallowed_screen.xml b/res/layout/master_clear_disallowed_screen.xml index 80326caea..ce14f4621 100644 --- a/res/layout/master_clear_disallowed_screen.xml +++ b/res/layout/master_clear_disallowed_screen.xml @@ -26,8 +26,8 @@ android:layout_height="match_parent" android:drawSelectorOnTop="false" android:scrollbarStyle="insideOverlay" - android:background="@android:color/white" - android:cacheColorHint="@android:color/white" + android:background="@color/background_color_white" + android:cacheColorHint="@color/background_color_white" android:fadingEdgeLength="16dip" /> <TextView android:id="@android:id/empty" diff --git a/res/layout/multi_sim_dialog.xml b/res/layout/multi_sim_dialog.xml index d0e7df875..95c601eff 100644 --- a/res/layout/multi_sim_dialog.xml +++ b/res/layout/multi_sim_dialog.xml @@ -82,7 +82,7 @@ android:text="@string/sim_editor_carrier" /> <TextView android:id="@+id/carrier" - android:textColor="@android:color/black" + android:textColor="@color/text_color_black" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingStart="@dimen/sim_content_padding" @@ -110,7 +110,7 @@ android:paddingBottom="@dimen/sim_dialog_margin_bottom" android:paddingStart="@dimen/sim_content_padding" android:singleLine="true" - android:textColor="@android:color/black" + android:textColor="@color/text_color_black" style="?android:attr/textAppearanceMedium" /> </LinearLayout> diff --git a/res/layout/ownerinfo.xml b/res/layout/ownerinfo.xml index c5eaff5f5..233e21562 100644 --- a/res/layout/ownerinfo.xml +++ b/res/layout/ownerinfo.xml @@ -19,7 +19,8 @@ android:paddingStart="20dip" android:paddingEnd="20dip" android:paddingTop="20dip" - android:orientation="vertical"> + android:orientation="vertical" + android:background="@color/background_color_white"> <EditText android:id="@+id/owner_info_edit_text" diff --git a/res/layout/preference_empty_list.xml b/res/layout/preference_empty_list.xml index 9faffe322..0a4c459a3 100644 --- a/res/layout/preference_empty_list.xml +++ b/res/layout/preference_empty_list.xml @@ -18,7 +18,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:minHeight="48dip" - android:background="@android:color/transparent"> + android:background="@color/background_color_transparent"> <TextView android:id="@+android:id/title" diff --git a/res/layout/preference_list_fragment.xml b/res/layout/preference_list_fragment.xml index 2e9299c78..489baa1fc 100644 --- a/res/layout/preference_list_fragment.xml +++ b/res/layout/preference_list_fragment.xml @@ -22,7 +22,7 @@ android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@android:color/transparent"> + android:background="@color/background_color_transparent"> <FrameLayout android:id="@+id/pinned_header" android:layout_width="match_parent" diff --git a/res/layout/user_dictionary_add_word.xml b/res/layout/user_dictionary_add_word.xml index 3624dad52..bf810b8eb 100644 --- a/res/layout/user_dictionary_add_word.xml +++ b/res/layout/user_dictionary_add_word.xml @@ -34,7 +34,7 @@ android:text="@string/user_dict_settings_add_dialog_title" /> <View android:layout_width="match_parent" android:layout_height="2dip" - android:background="@android:color/holo_blue_light" /> + android:background="@color/background_color_holo_blue_light" /> </LinearLayout> <EditText android:id="@+id/user_dictionary_add_word_text" diff --git a/res/values/cm_colors.xml b/res/values/cm_colors.xml index 02d1d391e..b4bfcdbd4 100644 --- a/res/values/cm_colors.xml +++ b/res/values/cm_colors.xml @@ -17,4 +17,43 @@ limitations under the License. <resources> <color name="floating_action_button_touch_tint">#80ffffff</color> <color name="theme_accent">#ff009688</color> + + <color name="screencolor_background">#50000000</color> + <drawable name="transparent_background">#00000000</drawable> + + <drawable name="expanded_item_bg_activated">#ffEEEEEE</drawable> + <drawable name="expanded_item_bg">@android:color/background_light</drawable> + <color name="expanded_button_color_normal">#4CAF50</color> + <color name="expanded_button_color_close">#F44336</color> + <color name="qs_tile_tint_color">#FF009587</color> + + <!-- Hard coded background and text colors exposed for better theme support --> + <color name="background_color_darker_gray">@android:color/darker_gray</color> + <color name="background_color_gray">#ddd</color> + <color name="background_color_holo_blue_light">@android:color/holo_blue_light</color> + <color name="background_color_transparent">@android:color/transparent</color> + <color name="background_color_white">@android:color/white</color> + <color name="text_color_black">@android:color/black</color> + <color name="text_color_darker_gray">@android:color/darker_gray</color> + <color name="text_color_holo_blue_light">@android:color/holo_blue_light</color> + <color name="text_color_secondary_text_material_light"> + @*android:color/secondary_text_material_light + </color> + <color name="text_color_translucent_white">#B3FFFFFF</color> + <color name="text_color_white">@android:color/white</color> + <!-- Dashboard background color --> + <color name="dashboard_category_background_color">@android:color/white</color> + <!-- Data usage chart color --> + <color name="data_usage_stroke_color">#00000000</color> + <color name="data_usage_fill_color">#ff009688</color> + <color name="data_usage_secondary_fill_color">#ff80cbc4</color> + <color name="data_usage_label_color">#ff37474f</color> + <color name="data_usage_secondary_label_color">#fff4511e</color> + <!-- Lockscreen shortcuts --> + <color name="lockscreen_shortcuts_text_color">#424242</color> + <color name="lockscreen_shortcuts_tint_color">#333333</color> + <!-- Owner info --> + <color name="ownerinfo_divider_color">#ff404040</color> + <!-- Installed app details --> + <color name="security_settings_billing_desc_color">#ffffb060</color> </resources> |