diff options
Diffstat (limited to 'java/com/android/contacts')
21 files changed, 32 insertions, 188 deletions
diff --git a/java/com/android/contacts/common/list/ViewPagerTabStrip.java b/java/com/android/contacts/common/list/ViewPagerTabStrip.java index 8835631f5..88c0369d6 100644 --- a/java/com/android/contacts/common/list/ViewPagerTabStrip.java +++ b/java/com/android/contacts/common/list/ViewPagerTabStrip.java @@ -24,7 +24,7 @@ import android.util.AttributeSet; import android.view.View; import android.widget.LinearLayout; import com.android.contacts.common.R; -import com.android.dialer.theme.ThemeUtil; +import com.android.dialer.theme.base.ThemeComponent; public class ViewPagerTabStrip extends LinearLayout { @@ -43,8 +43,8 @@ public class ViewPagerTabStrip extends LinearLayout { final Resources res = context.getResources(); mSelectedUnderlineThickness = res.getDimensionPixelSize(R.dimen.tab_selected_underline_height); - int underlineColor = ThemeUtil.getColorAccent(); - int backgroundColor = ThemeUtil.getColorPrimary(); + int underlineColor = ThemeComponent.get(context).theme().getColorAccent(); + int backgroundColor = ThemeComponent.get(context).theme().getColorPrimary(); mSelectedUnderlinePaint = new Paint(); mSelectedUnderlinePaint.setColor(underlineColor); diff --git a/java/com/android/contacts/common/list/ViewPagerTabs.java b/java/com/android/contacts/common/list/ViewPagerTabs.java index 1e6cf1354..f48fd29ca 100644 --- a/java/com/android/contacts/common/list/ViewPagerTabs.java +++ b/java/com/android/contacts/common/list/ViewPagerTabs.java @@ -163,7 +163,7 @@ public class ViewPagerTabs extends HorizontalScrollView implements ViewPager.OnP } else { final TextView textView = new TextView(getContext()); textView.setText(tabTitle); - textView.setBackgroundResource(R.drawable.view_pager_tab_background); + textView.setClickable(true); // Assign various text appearance related attributes to child views. if (mTextStyle > 0) { diff --git a/java/com/android/contacts/common/res/color/tab_text_color.xml b/java/com/android/contacts/common/res/color/tab_text_color.xml deleted file mode 100644 index 71ef3e903..000000000 --- a/java/com/android/contacts/common/res/color/tab_text_color.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - ~ Copyright (C) 2014 The Android Open Source Project - ~ - ~ Licensed under the Apache License, Version 2.0 (the "License"); - ~ you may not use this file except in compliance with the License. - ~ You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, software - ~ distributed under the License is distributed on an "AS IS" BASIS, - ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ~ See the License for the specific language governing permissions and - ~ limitations under the License - --> - -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:color="@color/actionbar_text_color" android:state_selected="true"/> - <item android:color="@color/actionbar_unselected_text_color"/> -</selector>
\ No newline at end of file diff --git a/java/com/android/contacts/common/res/drawable/dialog_background_material.xml b/java/com/android/contacts/common/res/drawable/dialog_background_material.xml index 1b71cd63a..c93d43ea6 100644 --- a/java/com/android/contacts/common/res/drawable/dialog_background_material.xml +++ b/java/com/android/contacts/common/res/drawable/dialog_background_material.xml @@ -18,6 +18,6 @@ android:inset="16dp"> <shape android:shape="rectangle"> <corners android:radius="2dp"/> - <solid android:color="@color/call_subject_history_background"/> + <solid android:color="?android:attr/colorBackground"/> </shape> </inset> diff --git a/java/com/android/contacts/common/res/drawable/ic_scroll_handle_default.xml b/java/com/android/contacts/common/res/drawable/ic_scroll_handle_default.xml index ac932f87c..9164ab1ab 100644 --- a/java/com/android/contacts/common/res/drawable/ic_scroll_handle_default.xml +++ b/java/com/android/contacts/common/res/drawable/ic_scroll_handle_default.xml @@ -17,4 +17,4 @@ <bitmap xmlns:android="http://schemas.android.com/apk/res/android" android:src="@drawable/ic_scroll_handle" - android:tint="@color/dialer_secondary_text_color"/> + android:tint="?colorIcon"/> diff --git a/java/com/android/contacts/common/res/drawable/item_background_material_borderless_dark.xml b/java/com/android/contacts/common/res/drawable/item_background_material_borderless_dark.xml deleted file mode 100644 index 94e309507..000000000 --- a/java/com/android/contacts/common/res/drawable/item_background_material_borderless_dark.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2014 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> - -<!-- Based on the Theme.Material's default selectableItemBackgroundBorderless --> -<ripple xmlns:android="http://schemas.android.com/apk/res/android" - android:color="@color/dialer_ripple_material_dark"/>
\ No newline at end of file diff --git a/java/com/android/contacts/common/res/drawable/item_background_material_dark.xml b/java/com/android/contacts/common/res/drawable/item_background_material_dark.xml deleted file mode 100644 index 91ab763a5..000000000 --- a/java/com/android/contacts/common/res/drawable/item_background_material_dark.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2014 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> - -<!-- Based on the Theme.Material's default selectableItemBackground --> -<ripple xmlns:android="http://schemas.android.com/apk/res/android" - android:color="@color/dialer_ripple_material_dark"> - <item android:id="@android:id/mask"> - <color android:color="@android:color/white"/> - </item> -</ripple>
\ No newline at end of file diff --git a/java/com/android/contacts/common/res/drawable/item_background_material_light.xml b/java/com/android/contacts/common/res/drawable/item_background_material_light.xml deleted file mode 100644 index d41accb02..000000000 --- a/java/com/android/contacts/common/res/drawable/item_background_material_light.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2014 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> - -<!-- Based on the Theme.Material's default selectableItemBackground --> -<ripple xmlns:android="http://schemas.android.com/apk/res/android" - android:color="@color/dialer_ripple_material_light"> - <item android:id="@android:id/mask"> - <color android:color="@android:color/white"/> - </item> -</ripple>
\ No newline at end of file diff --git a/java/com/android/contacts/common/res/drawable/unread_count_background.xml b/java/com/android/contacts/common/res/drawable/unread_count_background.xml index 4fc6b9b60..b58baef7c 100644 --- a/java/com/android/contacts/common/res/drawable/unread_count_background.xml +++ b/java/com/android/contacts/common/res/drawable/unread_count_background.xml @@ -17,5 +17,5 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <corners android:radius="@dimen/tab_unread_count_background_radius"/> - <solid android:color="@color/tab_unread_count_background_color"/> + <solid android:color="?android:attr/colorPrimaryDark"/> </shape> diff --git a/java/com/android/contacts/common/res/drawable/view_pager_tab_background.xml b/java/com/android/contacts/common/res/drawable/view_pager_tab_background.xml deleted file mode 100644 index bef30a434..000000000 --- a/java/com/android/contacts/common/res/drawable/view_pager_tab_background.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - ~ Copyright (C) 2014 The Android Open Source Project - ~ - ~ Licensed under the Apache License, Version 2.0 (the "License"); - ~ you may not use this file except in compliance with the License. - ~ You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, software - ~ distributed under the License is distributed on an "AS IS" BASIS, - ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ~ See the License for the specific language governing permissions and - ~ limitations under the License - --> -<ripple xmlns:android="http://schemas.android.com/apk/res/android" - android:color="@color/tab_ripple_color"> - <item android:id="@android:id/mask"> - <color android:color="@android:color/white"/> - </item> -</ripple>
\ No newline at end of file diff --git a/java/com/android/contacts/common/res/layout-ldrtl/unread_count_tab.xml b/java/com/android/contacts/common/res/layout-ldrtl/unread_count_tab.xml index 9e9be95e3..51d56bb22 100644 --- a/java/com/android/contacts/common/res/layout-ldrtl/unread_count_tab.xml +++ b/java/com/android/contacts/common/res/layout-ldrtl/unread_count_tab.xml @@ -19,7 +19,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@drawable/view_pager_tab_background" + android:background="@drawable/item_background_material_borderless_dark" android:layoutDirection="ltr"> <!-- The tab icon --> <ImageView @@ -42,7 +42,7 @@ android:layoutDirection="locale" android:minWidth="@dimen/tab_unread_count_background_size" android:textAlignment="center" - android:textColor="@color/tab_accent_color" + android:textColor="?android:attr/colorAccent" android:textSize="@dimen/tab_unread_count_text_size"/> </RelativeLayout> diff --git a/java/com/android/contacts/common/res/layout/account_filter_header.xml b/java/com/android/contacts/common/res/layout/account_filter_header.xml index a12ab08fd..592c240a9 100644 --- a/java/com/android/contacts/common/res/layout/account_filter_header.xml +++ b/java/com/android/contacts/common/res/layout/account_filter_header.xml @@ -23,7 +23,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@color/background_primary"> + android:background="?android:attr/colorBackground"> <!-- Used to show the touch feedback --> <FrameLayout android:id="@+id/account_filter_header_container" diff --git a/java/com/android/contacts/common/res/layout/call_subject_history_list_item.xml b/java/com/android/contacts/common/res/layout/call_subject_history_list_item.xml index c378f24b2..c08327c29 100644 --- a/java/com/android/contacts/common/res/layout/call_subject_history_list_item.xml +++ b/java/com/android/contacts/common/res/layout/call_subject_history_list_item.xml @@ -25,5 +25,5 @@ android:paddingEnd="@dimen/call_subject_dialog_margin" android:gravity="center_vertical" android:singleLine="true" - android:textColor="@color/dialer_primary_text_color" + android:textColor="?android:attr/textColorPrimary" android:textSize="@dimen/call_subject_dialog_primary_text_size"/> diff --git a/java/com/android/contacts/common/res/layout/contact_list_card.xml b/java/com/android/contacts/common/res/layout/contact_list_card.xml index a04f4cad9..37bb8ea27 100644 --- a/java/com/android/contacts/common/res/layout/contact_list_card.xml +++ b/java/com/android/contacts/common/res/layout/contact_list_card.xml @@ -24,16 +24,16 @@ android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="@integer/contact_list_space_layout_weight" - android:background="@color/background_primary"/> + android:background="?android:attr/colorBackground"/> <View android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="@integer/contact_list_card_layout_weight" - android:background="@color/contact_all_list_background_color" + android:background="?android:attr/colorBackground" android:elevation="@dimen/contact_list_card_elevation"/> <View android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="@integer/contact_list_space_layout_weight" - android:background="@color/background_primary"/> + android:background="?android:attr/colorBackground"/> </LinearLayout> diff --git a/java/com/android/contacts/common/res/layout/default_account_checkbox.xml b/java/com/android/contacts/common/res/layout/default_account_checkbox.xml index 1e76b74f5..911098397 100644 --- a/java/com/android/contacts/common/res/layout/default_account_checkbox.xml +++ b/java/com/android/contacts/common/res/layout/default_account_checkbox.xml @@ -44,7 +44,7 @@ android:text="@string/set_default_account" android:textAlignment="viewStart" android:textAppearance="?android:attr/textAppearanceSmall" - android:textColor="@color/dialer_secondary_text_color" + android:textColor="?android:attr/textColorSecondary" /> </LinearLayout> diff --git a/java/com/android/contacts/common/res/layout/dialog_call_subject.xml b/java/com/android/contacts/common/res/layout/dialog_call_subject.xml index df8e8d299..d20aa3b45 100644 --- a/java/com/android/contacts/common/res/layout/dialog_call_subject.xml +++ b/java/com/android/contacts/common/res/layout/dialog_call_subject.xml @@ -67,7 +67,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" - android:textColor="@color/dialer_primary_text_color" + android:textColor="?android:attr/textColorPrimary" android:textSize="@dimen/call_subject_dialog_secondary_text_size"/> <TextView @@ -77,7 +77,7 @@ android:layout_marginTop="@dimen/call_subject_dialog_between_line_margin" android:layout_gravity="center_vertical" android:singleLine="true" - android:textColor="@color/dialer_secondary_text_color" + android:textColor="?android:attr/textColorSecondary" android:textSize="@dimen/call_subject_dialog_secondary_text_size"/> </LinearLayout> </LinearLayout> @@ -94,7 +94,7 @@ android:background="@null" android:gravity="top" android:hint="@string/call_subject_hint" - android:textColor="@color/dialer_secondary_text_color" + android:textColor="?android:attr/textColorSecondary" android:textSize="@dimen/call_subject_dialog_secondary_text_size" /> @@ -107,7 +107,7 @@ android:layout_marginStart="@dimen/call_subject_dialog_margin" android:layout_marginEnd="@dimen/call_subject_dialog_margin" android:singleLine="true" - android:textColor="@color/dialer_secondary_text_color" + android:textColor="?android:attr/textColorSecondary" android:textSize="@dimen/call_subject_dialog_secondary_text_size"/> <View @@ -130,7 +130,7 @@ android:layout_alignParentStart="true" android:layout_centerVertical="true" android:src="@drawable/quantum_ic_history_vd_theme_24" - android:tint="@color/call_subject_history_icon"/> + android:tint="?colorIcon"/> <TextView android:id="@+id/send_and_call_button" @@ -152,7 +152,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/dialog_view" - android:background="@color/call_subject_history_background" + android:background="?android:attr/colorBackground" android:divider="@null" android:elevation="8dp"/> diff --git a/java/com/android/contacts/common/res/layout/search_bar_expanded.xml b/java/com/android/contacts/common/res/layout/search_bar_expanded.xml index ccea3f76f..c9ab6a92d 100644 --- a/java/com/android/contacts/common/res/layout/search_bar_expanded.xml +++ b/java/com/android/contacts/common/res/layout/search_bar_expanded.xml @@ -29,7 +29,7 @@ android:background="?attr/selectableItemBackgroundBorderless" android:contentDescription="@string/action_menu_back_from_search" android:src="@drawable/back_arrow" - android:tint="@color/contactscommon_actionbar_background_color"/> + android:tint="?colorTextOnUnthemedDarkBackground"/> <EditText android:id="@+id/search_view" @@ -44,8 +44,8 @@ android:imeOptions="flagNoExtractUi" android:inputType="textFilter" android:maxLines="1" - android:textColor="@color/searchbox_text_color" - android:textColorHint="@color/searchbox_hint_text_color" + android:textColor="?android:attr/textColorPrimary" + android:textColorHint="?android:attr/textColorHint" android:textCursorDrawable="@drawable/searchedittext_custom_cursor" android:textSize="@dimen/search_text_size"/> @@ -60,5 +60,5 @@ android:clickable="true" android:contentDescription="@string/description_clear_search" android:src="@drawable/quantum_ic_close_vd_theme_24" - android:tint="@color/searchbox_icon_tint"/> + android:tint="?colorIcon"/> </RelativeLayout> diff --git a/java/com/android/contacts/common/res/layout/select_account_list_item.xml b/java/com/android/contacts/common/res/layout/select_account_list_item.xml index 98e7c5454..e77c53c7e 100644 --- a/java/com/android/contacts/common/res/layout/select_account_list_item.xml +++ b/java/com/android/contacts/common/res/layout/select_account_list_item.xml @@ -46,7 +46,7 @@ android:layout_height="wrap_content" android:includeFontPadding="false" android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="@color/dialer_primary_text_color"/> + android:textColor="?android:attr/textColorPrimary"/> <TextView android:id="@+id/number" android:layout_width="match_parent" @@ -54,7 +54,7 @@ android:includeFontPadding="false" android:maxLines="1" android:textAppearance="?android:attr/textAppearanceSmall" - android:textColor="@color/dialer_secondary_text_color" + android:textColor="?android:attr/textColorSecondary" android:visibility="gone"/> <TextView android:id="@+id/hint" @@ -62,7 +62,7 @@ android:layout_height="wrap_content" android:includeFontPadding="false" android:textAppearance="?android:attr/textAppearanceSmall" - android:textColor="@color/dialer_secondary_text_color" + android:textColor="?android:attr/textColorSecondary" android:visibility="gone"/> </LinearLayout> diff --git a/java/com/android/contacts/common/res/layout/unread_count_tab.xml b/java/com/android/contacts/common/res/layout/unread_count_tab.xml index 83481ee2d..d8357f491 100644 --- a/java/com/android/contacts/common/res/layout/unread_count_tab.xml +++ b/java/com/android/contacts/common/res/layout/unread_count_tab.xml @@ -16,7 +16,7 @@ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@drawable/view_pager_tab_background"> + android:background="@drawable/item_background_material_borderless_dark"> <!-- The tab icon --> <ImageView android:id="@+id/icon" @@ -38,6 +38,6 @@ android:importantForAccessibility="no" android:minWidth="@dimen/tab_unread_count_background_size" android:textAlignment="center" - android:textColor="@color/tab_accent_color" + android:textColor="?android:attr/colorAccent" android:textSize="@dimen/tab_unread_count_text_size"/> </RelativeLayout> diff --git a/java/com/android/contacts/common/res/values/colors.xml b/java/com/android/contacts/common/res/values/colors.xml index b05c19a83..ab9f19b29 100644 --- a/java/com/android/contacts/common/res/values/colors.xml +++ b/java/com/android/contacts/common/res/values/colors.xml @@ -15,20 +15,6 @@ --> <resources> - <!-- Color of ripples used for views with dark backgrounds --> - <color name="dialer_ripple_material_dark">#a0ffffff</color> - - <!-- Color of ripples used for views with light backgrounds --> - <color name="dialer_ripple_material_light">#30000000</color> - - <!-- Divider color for header separator --> - <color name="primary_text_color">#363636</color> - - <color name="secondary_text_color">@color/dialer_secondary_text_color</color> - - <!-- Text color for section header. --> - <color name="section_header_text_color">#2A56C6</color> - <!-- Color of the theme of the People app --> <color name="people_app_theme_color">#363636</color> @@ -51,36 +37,6 @@ <item>#424242</item> </array> - <color name="contactscommon_actionbar_background_color">?android:attr/colorPrimary</color> - - <color name="tab_ripple_color">#ffffff</color> - <color name="tab_accent_color">@color/tab_ripple_color</color> - <color name="tab_selected_underline_color">#f50057</color> - <color name="tab_unread_count_background_color">#1C3AA9</color> - - <!-- Color of the title to the Frequently Contacted section --> - <color name="frequently_contacted_title_color">@color/contactscommon_actionbar_background_color - </color> - - <!-- Color of action bar text. Ensure this stays in sync with packages/Telephony - phone_settings_actionbar_text_color--> - <color name="actionbar_text_color">#ffffff</color> - <color name="actionbar_unselected_text_color">#a6ffffff</color> - - <!-- Text color of the search box text as entered by user --> - <color name="searchbox_text_color">@color/dialer_primary_text_color</color> - <!-- Background color of the search box --> - <color name="searchbox_background_color">#ffffff</color> - - <color name="searchbox_hint_text_color">#737373</color> - <color name="searchbox_icon_tint">@color/searchbox_hint_text_color</color> - - <color name="search_shortcut_icon_color">?android:attr/colorPrimary</color> - - <!-- Color of the background of the contact detail and editor pages --> - <color name="background_primary">#f9f9f9</color> - <color name="contact_all_list_background_color">#FFFFFF</color> - <!-- Text color used for character counter when the max limit has been exceeded --> <color name="call_subject_limit_exceeded">#d1041c</color> @@ -92,8 +48,4 @@ <!-- Text color for the SEND & CALL button on the call subject dialog. --> <color name="call_subject_button">#00c853</color> - - <!-- Background color for the call subject history view. --> - <color name="call_subject_history_background">#ffffff</color> - <color name="search_video_call_icon_tint">@color/searchbox_hint_text_color</color> </resources> diff --git a/java/com/android/contacts/common/res/values/styles.xml b/java/com/android/contacts/common/res/values/styles.xml index bb19afe82..4f0b3f15f 100644 --- a/java/com/android/contacts/common/res/values/styles.xml +++ b/java/com/android/contacts/common/res/values/styles.xml @@ -23,13 +23,13 @@ <style name="SectionHeaderStyle" parent="@android:style/TextAppearance.Large"> <item name="android:textSize">16sp</item> <item name="android:textAllCaps">true</item> - <item name="android:textColor">@color/section_header_text_color</item> + <item name="android:textColor">?android:attr/textColorPrimary</item> <item name="android:textStyle">bold</item> </style> <style name="DirectoryHeaderStyle" parent="@android:style/TextAppearance.Small"> <item name="android:textSize">14sp</item> - <item name="android:textColor">@color/dialer_secondary_text_color</item> + <item name="android:textColor">?android:attr/textColorSecondary</item> <item name="android:fontFamily">sans-serif-medium</item> </style> |