summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/callcomposer/res
diff options
context:
space:
mode:
authorcalderwoodra <calderwoodra@google.com>2018-05-19 00:05:02 -0700
committerCopybara-Service <copybara-piper@google.com>2018-05-21 13:17:30 -0700
commit929539eb864822d669265b142bdcc49b6cf8ea6b (patch)
treefcaef3fac4068e3669ca5916f7a743d0d5e41bbb /java/com/android/dialer/callcomposer/res
parentea7399a7c0c8a3832a6592aee0a0372c300b11f5 (diff)
Implement a global theme to be easily configured in Dialer.
deleted several colors and unified them across the app migrated several alert dialogs to support alert dialogs added many todos migrated several tests from GoogleRobolectricTestRunner to RobolectricTestRunner Because of the test migration: - moved dialpad theme attributes into dialpad/theme - moved incall ui theme attributes into incallui/theme Bug: 79883035 Test: tap PiperOrigin-RevId: 197246477 Change-Id: Ifc534793bc32757bbbf2007a7c40287c8d0817ad
Diffstat (limited to 'java/com/android/dialer/callcomposer/res')
-rw-r--r--java/com/android/dialer/callcomposer/res/drawable/call_composer_contact_border.xml2
-rw-r--r--java/com/android/dialer/callcomposer/res/drawable/gallery_grid_item_view_background.xml2
-rw-r--r--java/com/android/dialer/callcomposer/res/drawable/gallery_item_selected_drawable.xml6
-rw-r--r--java/com/android/dialer/callcomposer/res/layout/call_composer_activity.xml10
-rw-r--r--java/com/android/dialer/callcomposer/res/layout/fragment_gallery_composer.xml2
-rw-r--r--java/com/android/dialer/callcomposer/res/layout/fragment_message_composer.xml8
-rw-r--r--java/com/android/dialer/callcomposer/res/layout/permission_view.xml4
-rw-r--r--java/com/android/dialer/callcomposer/res/values/styles.xml3
8 files changed, 18 insertions, 19 deletions
diff --git a/java/com/android/dialer/callcomposer/res/drawable/call_composer_contact_border.xml b/java/com/android/dialer/callcomposer/res/drawable/call_composer_contact_border.xml
index b3c36e9e0..16afed495 100644
--- a/java/com/android/dialer/callcomposer/res/drawable/call_composer_contact_border.xml
+++ b/java/com/android/dialer/callcomposer/res/drawable/call_composer_contact_border.xml
@@ -20,7 +20,7 @@
<stroke
android:width="@dimen/call_composer_contact_photo_border_thickness"
- android:color="@color/background_dialer_white"/>
+ android:color="?android:attr/colorBackground"/>
<padding
android:bottom="@dimen/call_composer_contact_photo_border_thickness"
diff --git a/java/com/android/dialer/callcomposer/res/drawable/gallery_grid_item_view_background.xml b/java/com/android/dialer/callcomposer/res/drawable/gallery_grid_item_view_background.xml
index bbae1a821..f57160890 100644
--- a/java/com/android/dialer/callcomposer/res/drawable/gallery_grid_item_view_background.xml
+++ b/java/com/android/dialer/callcomposer/res/drawable/gallery_grid_item_view_background.xml
@@ -18,5 +18,5 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="@dimen/gallery_item_corner_radius"/>
- <solid android:color="@color/background_dialer_white"/>
+ <solid android:color="?android:attr/colorBackground"/>
</shape>
diff --git a/java/com/android/dialer/callcomposer/res/drawable/gallery_item_selected_drawable.xml b/java/com/android/dialer/callcomposer/res/drawable/gallery_item_selected_drawable.xml
index 5050407c5..6e726c889 100644
--- a/java/com/android/dialer/callcomposer/res/drawable/gallery_item_selected_drawable.xml
+++ b/java/com/android/dialer/callcomposer/res/drawable/gallery_item_selected_drawable.xml
@@ -20,9 +20,9 @@
android:shape="oval">
<stroke
android:width="1dp"
- android:color="@color/dialer_theme_color"/>
+ android:color="?android:attr/colorPrimary"/>
<solid
- android:color="@color/background_dialer_white"/>
+ android:color="?android:attr/colorBackground"/>
<size
android:height="@dimen/gallery_check_size"
android:width="@dimen/gallery_check_size"/>
@@ -32,6 +32,6 @@
<bitmap
android:gravity="center"
android:src="@drawable/quantum_ic_check_black_24"
- android:tint="@color/dialer_theme_color"/>
+ android:tint="?android:attr/colorPrimary"/>
</item>
</layer-list> \ No newline at end of file
diff --git a/java/com/android/dialer/callcomposer/res/layout/call_composer_activity.xml b/java/com/android/dialer/callcomposer/res/layout/call_composer_activity.xml
index 48d6368c2..4d3769b6d 100644
--- a/java/com/android/dialer/callcomposer/res/layout/call_composer_activity.xml
+++ b/java/com/android/dialer/callcomposer/res/layout/call_composer_activity.xml
@@ -45,7 +45,7 @@
android:paddingBottom="@dimen/call_composer_contact_container_padding_bottom"
android:paddingStart="16dp"
android:paddingEnd="16dp"
- android:background="@color/dialer_theme_color">
+ android:background="?android:attr/colorPrimary">
<TextView
android:id="@+id/contact_name"
@@ -54,7 +54,7 @@
android:gravity="center"
android:maxLines="1"
android:ellipsize="end"
- android:textColor="@color/background_dialer_white"
+ android:textColor="?android:attr/colorBackground"
android:textSize="@dimen/call_composer_name_text_size"/>
<TextView
@@ -64,7 +64,7 @@
android:gravity="center"
android:maxLines="1"
android:ellipsize="end"
- android:textColor="@color/background_dialer_white"
+ android:textColor="?android:attr/colorBackground"
android:textSize="@dimen/call_composer_number_text_size"/>
</LinearLayout>
@@ -105,7 +105,7 @@
android:layout_height="@dimen/call_composer_media_bar_height"
android:orientation="horizontal"
android:gravity="center_horizontal"
- android:background="@color/dialer_theme_color_dark"
+ android:background="?android:attr/colorPrimaryDark"
android:clickable="true">
<ImageView
@@ -153,7 +153,7 @@
android:text="@string/share_and_call"
android:textSize="@dimen/send_and_call_text_size"
android:fontFamily="sans-serif-medium"
- android:textColor="@color/background_dialer_white"/>
+ android:textColor="?android:attr/colorBackground"/>
</FrameLayout>
</FrameLayout>
diff --git a/java/com/android/dialer/callcomposer/res/layout/fragment_gallery_composer.xml b/java/com/android/dialer/callcomposer/res/layout/fragment_gallery_composer.xml
index 6cd6418a4..72b9fa685 100644
--- a/java/com/android/dialer/callcomposer/res/layout/fragment_gallery_composer.xml
+++ b/java/com/android/dialer/callcomposer/res/layout/fragment_gallery_composer.xml
@@ -18,7 +18,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/background_dialer_white"
+ android:background="?android:attr/colorBackground"
android:paddingBottom="@dimen/call_composer_media_bar_height">
<GridView
diff --git a/java/com/android/dialer/callcomposer/res/layout/fragment_message_composer.xml b/java/com/android/dialer/callcomposer/res/layout/fragment_message_composer.xml
index 39c2d0d47..49df9e679 100644
--- a/java/com/android/dialer/callcomposer/res/layout/fragment_message_composer.xml
+++ b/java/com/android/dialer/callcomposer/res/layout/fragment_message_composer.xml
@@ -20,7 +20,7 @@
android:layout_height="@dimen/call_composer_view_pager_height"
android:orientation="vertical"
android:gravity="bottom"
- android:background="@color/background_dialer_white">
+ android:background="?android:attr/colorBackground">
<TextView
android:id="@+id/message_urgent"
@@ -65,8 +65,8 @@
android:textSize="@dimen/message_compose_item_text_size"
android:hint="@string/message_composer_custom_message_hint"
android:textColor="@color/dialer_primary_text_color"
- android:textColorHint="@color/dialer_edit_text_hint_color"
- android:background="@color/background_dialer_white"
+ android:textColorHint="?android:attr/textColorHint"
+ android:background="?android:attr/colorBackground"
android:textCursorDrawable="@drawable/searchedittext_custom_cursor"
android:layout_toStartOf="@+id/remaining_characters"
android:inputType="textShortMessage|textCapSentences"
@@ -81,6 +81,6 @@
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:textSize="@dimen/message_compose_remaining_char_text_size"
- android:textColor="@color/dialer_edit_text_hint_color"/>
+ android:textColor="?android:attr/textColorHint"/>
</RelativeLayout>
</LinearLayout> \ No newline at end of file
diff --git a/java/com/android/dialer/callcomposer/res/layout/permission_view.xml b/java/com/android/dialer/callcomposer/res/layout/permission_view.xml
index 4daa11d62..783ba9867 100644
--- a/java/com/android/dialer/callcomposer/res/layout/permission_view.xml
+++ b/java/com/android/dialer/callcomposer/res/layout/permission_view.xml
@@ -20,7 +20,7 @@
android:layout_height="match_parent"
android:gravity="center"
android:clickable="true"
- android:background="@color/background_dialer_white">
+ android:background="?android:attr/colorBackground">
<ImageView
android:id="@+id/permission_icon"
@@ -45,7 +45,7 @@
android:text="@string/allow"
android:textAllCaps="true"
android:textSize="@dimen/allow_permission_text_size"
- android:textColor="@color/dialer_theme_color"
+ android:textColor="?android:attr/colorPrimary"
android:background="?android:attr/selectableItemBackground"
android:padding="@dimen/permission_allow_padding"
android:theme="@style/Theme.AppCompat.Light"/>
diff --git a/java/com/android/dialer/callcomposer/res/values/styles.xml b/java/com/android/dialer/callcomposer/res/values/styles.xml
index a03ee4894..aeec2a369 100644
--- a/java/com/android/dialer/callcomposer/res/values/styles.xml
+++ b/java/com/android/dialer/callcomposer/res/values/styles.xml
@@ -15,8 +15,7 @@
~ limitations under the License
-->
<resources>
- <style name="Theme.AppCompat.CallComposer" parent="DialerThemeBase.NoActionBar">
- <item name="android:colorPrimaryDark">@color/dialer_theme_color_dark</item>
+ <style name="Theme.AppCompat.CallComposer" parent="Dialer.ThemeBase.NoActionBar">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowFrame">@null</item>