diff options
author | Ta-wei Yen <twyen@google.com> | 2015-11-17 01:16:37 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2015-11-17 01:16:37 +0000 |
commit | 1fbf06c079db082b5b1e9fdab809e2b1a30b55df (patch) | |
tree | beeaf148f4d25b905f135b07303c1604b0b4ecc5 | |
parent | cf0a0b610f0ec9e5a0817d2c1f0ef0e9986bf6c0 (diff) | |
parent | 872997b1795d5aa22de8cb1dbc8e805c2889aa36 (diff) |
Tweak block number UI am: 03fd6dceda
am: 872997b179
* commit '872997b1795d5aa22de8cb1dbc8e805c2889aa36':
Tweak block number UI
-rw-r--r-- | res/layout/blocked_number_footer.xml | 23 | ||||
-rw-r--r-- | res/layout/blocked_number_header.xml | 149 | ||||
-rw-r--r-- | res/layout/blocked_number_item.xml | 21 | ||||
-rw-r--r-- | res/values/colors.xml | 6 | ||||
-rw-r--r-- | res/values/dimens.xml | 5 | ||||
-rw-r--r-- | res/values/strings.xml | 8 | ||||
-rw-r--r-- | res/values/styles.xml | 2 |
7 files changed, 112 insertions, 102 deletions
diff --git a/res/layout/blocked_number_footer.xml b/res/layout/blocked_number_footer.xml index cdb3ead1b..17425c840 100644 --- a/res/layout/blocked_number_footer.xml +++ b/res/layout/blocked_number_footer.xml @@ -14,27 +14,24 @@ limitations under the License. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:card_view="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:focusable="false"> <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical" - android:layout_marginBottom="8dp" - android:padding="16dp" - android:background="@android:color/white" - android:focusable="true"> - - <TextView android:id="@+id/blocked_number_footer_textview" android:layout_width="match_parent" android:layout_height="wrap_content" - android:textColor="@color/blocked_number_secondary_text_color" - android:textSize="@dimen/blocked_number_primary_text_size" - android:text="@string/block_number_footer_message_vvm" /> + android:orientation="vertical" + android:padding="@dimen/blocked_number_container_padding" + android:background="@android:color/white" + android:focusable="true"> + <TextView android:id="@+id/blocked_number_footer_textview" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textColor="@color/blocked_number_secondary_text_color" + android:textSize="@dimen/blocked_number_settings_description_text_size" + android:text="@string/block_number_footer_message_vvm"/> </LinearLayout> </LinearLayout> diff --git a/res/layout/blocked_number_header.xml b/res/layout/blocked_number_header.xml index 685c4efd8..0af942943 100644 --- a/res/layout/blocked_number_header.xml +++ b/res/layout/blocked_number_header.xml @@ -17,31 +17,34 @@ xmlns:card_view="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="vertical" - android:focusable="false"> + android:focusable="false" + android:orientation="vertical"> - <LinearLayout android:id="@+id/blocked_numbers_disabled_for_emergency" + <LinearLayout + android:id="@+id/blocked_numbers_disabled_for_emergency" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="vertical" - android:layout_marginBottom="8dp" - android:padding="16dp" + android:paddingTop="27dp" + android:paddingBottom="29dp" + android:paddingStart="@dimen/blocked_number_container_padding" + android:paddingEnd="44dp" + android:background="@color/blocked_number_disabled_emergency_background_color" android:focusable="true" + android:orientation="vertical" android:visibility="gone"> <TextView + style="@style/BlockedNumbersDescriptionTextStyle" + android:textStyle="bold" android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/blocked_numbers_disabled_emergency_header_label" - android:textStyle="bold" - android:textColor="@color/blocked_number_disabled_emergency_header_color" - style="@style/BlockedNumbersDescriptionTextStyle" /> + android:text="@string/blocked_numbers_disabled_emergency_header_label"/> <TextView + style="@style/BlockedNumbersDescriptionTextStyle" android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/blocked_numbers_disabled_emergency_desc" - style="@style/BlockedNumbersDescriptionTextStyle" /> + android:text="@string/blocked_numbers_disabled_emergency_desc"/> </LinearLayout> @@ -53,94 +56,104 @@ <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="vertical" android:background="@android:color/white" - android:focusable="true"> + android:focusable="true" + android:orientation="vertical"> - <TextView android:id="@+id/textView" + <TextView + android:id="@+id/textView" + style="@android:style/TextAppearance.Material.Subhead" android:layout_width="wrap_content" - android:layout_height="wrap_content" + android:layout_height="48dp" + android:paddingStart="@dimen/blocked_number_container_padding" + android:gravity="center_vertical" android:text="@string/block_list" - android:textColor="@color/blocked_number_header_color" - android:padding="@dimen/blocked_number_container_padding" - style="@android:style/TextAppearance.Material.Subhead" /> + android:textColor="@color/blocked_number_header_color"/> - <RelativeLayout android:id="@+id/import_settings" + <RelativeLayout + android:id="@+id/import_settings" android:layout_width="match_parent" android:layout_height="wrap_content" android:visibility="gone"> - <TextView android:id="@+id/import_description" + <TextView + android:id="@+id/import_description" + style="@style/BlockedNumbersDescriptionTextStyle" android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/blocked_call_settings_import_description" - android:textSize="@dimen/blocked_number_settings_description_text_size" + android:paddingTop="11dp" + android:paddingBottom="27dp" android:paddingStart="@dimen/blocked_number_container_padding" android:paddingEnd="@dimen/blocked_number_container_padding" - style="@style/BlockedNumbersDescriptionTextStyle" /> + android:text="@string/blocked_call_settings_import_description" + android:textColor="@color/secondary_text_color" + android:textSize="@dimen/blocked_number_settings_description_text_size"/> - <Button android:id="@+id/import_button" + <Button + android:id="@+id/import_button" + style="@style/DialerFlatButtonStyle" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_below="@id/import_description" - android:layout_alignParentEnd="true" android:layout_marginEnd="@dimen/blocked_number_container_padding" - android:text="@string/blocked_call_settings_import_button" - style="@style/DialerFlatButtonStyle" /> + android:layout_alignParentEnd="true" + android:layout_below="@id/import_description" + android:text="@string/blocked_call_settings_import_button"/> - <Button android:id="@+id/view_numbers_button" + <Button + android:id="@+id/view_numbers_button" + style="@style/DialerFlatButtonStyle" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginEnd="8dp" android:layout_below="@id/import_description" - android:layout_toLeftOf="@id/import_button" - android:text="@string/blocked_call_settings_view_numbers_button" - style="@style/DialerFlatButtonStyle" /> + android:layout_toStartOf="@id/import_button" + android:text="@string/blocked_call_settings_view_numbers_button"/> <View android:layout_width="match_parent" android:layout_height="1dp" + android:layout_marginTop="8dp" android:layout_below="@id/import_button" - android:background="@color/divider_line_color" - android:layout_marginTop="8dp" /> + android:background="@color/divider_line_color"/> </RelativeLayout> <LinearLayout - android:id="@+id/add_number_linear_layout" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingStart="@dimen/blocked_number_horizontal_margin" - android:paddingTop="@dimen/blocked_number_top_margin" - android:paddingBottom="@dimen/blocked_number_bottom_margin" - android:baselineAligned="false" - android:gravity="center_vertical" - android:orientation="horizontal" - android:focusable="true" - android:clickable="true" - android:background="?android:attr/selectableItemBackground" - android:contentDescription="@string/addBlockedNumber"> + android:id="@+id/add_number_linear_layout" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingTop="@dimen/blocked_number_add_top_margin" + android:paddingBottom="@dimen/blocked_number_add_bottom_margin" + android:paddingStart="@dimen/blocked_number_horizontal_margin" + android:background="?android:attr/selectableItemBackground" + android:baselineAligned="false" + android:clickable="true" + android:contentDescription="@string/addBlockedNumber" + android:focusable="true" + android:gravity="center_vertical" + android:orientation="horizontal"> <ImageView - android:id="@+id/add_number_icon" - android:layout_width="@dimen/contact_photo_size" - android:layout_height="@dimen/contact_photo_size" - android:importantForAccessibility="no" /> + android:id="@+id/add_number_icon" + android:layout_width="@dimen/contact_photo_size" + android:layout_height="@dimen/contact_photo_size" + android:importantForAccessibility="no"/> <LinearLayout - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1" - android:orientation="vertical" - android:gravity="center_vertical" - android:layout_marginStart="@dimen/blocked_number_horizontal_margin"> - - <TextView android:id="@+id/add_number_textview" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textColor="@color/blocked_number_primary_text_color" - android:textSize="@dimen/blocked_number_primary_text_size" - android:includeFontPadding="false" - android:layout_marginBottom="5dp" - android:text="@string/addBlockedNumber" /> + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:layout_marginStart="@dimen/blocked_number_horizontal_margin" + android:gravity="center_vertical" + android:orientation="vertical"> + + <TextView + android:id="@+id/add_number_textview" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:includeFontPadding="false" + android:text="@string/addBlockedNumber" + android:textColor="@color/blocked_number_primary_text_color" + android:textSize="@dimen/blocked_number_primary_text_size"/> </LinearLayout> </LinearLayout> @@ -150,7 +163,7 @@ android:layout_width="match_parent" android:layout_height="1dp" android:layout_marginStart="72dp" - android:background="@color/divider_line_color" /> + android:background="@color/divider_line_color"/> </LinearLayout> diff --git a/res/layout/blocked_number_item.xml b/res/layout/blocked_number_item.xml index 82e2207b7..a4997f257 100644 --- a/res/layout/blocked_number_item.xml +++ b/res/layout/blocked_number_item.xml @@ -19,26 +19,25 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingStart="@dimen/blocked_number_horizontal_margin" - android:paddingTop="@dimen/blocked_number_top_margin" - android:paddingBottom="@dimen/blocked_number_bottom_margin" android:baselineAligned="false" - android:gravity="center_vertical" android:orientation="horizontal" android:focusable="true" + android:gravity="center_vertical" android:background="@android:color/white"> <QuickContactBadge android:id="@+id/quick_contact_photo" android:layout_width="@dimen/contact_photo_size" android:layout_height="@dimen/contact_photo_size" - android:focusable="true" /> - + android:focusable="true" + android:layout_marginTop="@dimen/blocked_number_top_margin" + android:layout_marginBottom="@dimen/blocked_number_bottom_margin"/> <LinearLayout android:layout_width="0dp" - android:layout_height="wrap_content" + android:layout_height="match_parent" + android:gravity="center_vertical" android:layout_weight="1" android:orientation="vertical" - android:gravity="center_vertical" android:layout_marginStart="@dimen/blocked_number_horizontal_margin"> <TextView @@ -48,16 +47,14 @@ android:textColor="@color/blocked_number_primary_text_color" android:textSize="@dimen/blocked_number_primary_text_size" android:includeFontPadding="false" - android:layout_marginBottom="5dp" - android:singleLine="true" /> + android:singleLine="true"/> <TextView android:id="@+id/caller_number" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="@color/blocked_number_secondary_text_color" - android:textSize="@dimen/blocked_number_secondary_text_size" - android:layout_marginBottom="1dp" + android:textSize="@dimen/blocked_number_settings_description_text_size" android:singleLine="true" /> </LinearLayout> @@ -65,7 +62,7 @@ android:id="@+id/delete_button" android:layout_width="@dimen/blocked_number_delete_icon_size" android:layout_height="@dimen/blocked_number_delete_icon_size" - android:layout_marginEnd="16dp" + android:layout_marginEnd="24dp" android:background="?android:attr/selectableItemBackgroundBorderless" android:src="@drawable/ic_remove" android:scaleType="center" diff --git a/res/values/colors.xml b/res/values/colors.xml index e927f740f..75d05ac99 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -121,20 +121,20 @@ <color name="floating_action_button_touch_tint">#80ffffff</color> <color name="call_log_action_divider">#eeeeee</color> - <color name="divider_line_color">#c7c7c7</color> + <color name="divider_line_color">#D8D8D8</color> <!-- Colors for blocked numbers list --> <color name="blocked_contact_background">#afafaf</color> <color name="blocked_number_primary_text_color">@color/dialtacts_primary_text_color</color> <color name="blocked_number_secondary_text_color">@color/dialtacts_secondary_text_color</color> <color name="blocked_number_icon_tint">#616161</color> - <color name="blocked_number_background">#E0E0E0</color> + <color name="blocked_number_background">#FFFFFF</color> <color name="blocked_number_accent_color">#42A5F5</color> <color name="blocked_number_block_color">#F44336</color> <color name="blocked_number_header_color">@color/dialer_theme_color</color> <color name="blocked_number_disabled_emergency_header_color">#616161</color> + <color name="blocked_number_disabled_emergency_background_color">#E0E0E0</color> <color name="add_blocked_number_icon_color">#bdbdbd</color> - <!-- Grey 700 --> <color name="call_detail_footer_text_color">#616161</color> <color name="call_detail_footer_icon_tint">@color/call_detail_footer_text_color</color> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 18f33d5f2..4865280ff 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -160,11 +160,14 @@ <dimen name="blocked_number_horizontal_margin">16dp</dimen> <dimen name="blocked_number_top_margin">16dp</dimen> <dimen name="blocked_number_bottom_margin">16dp</dimen> + <dimen name="blocked_number_add_top_margin">8dp</dimen> + <dimen name="blocked_number_add_bottom_margin">8dp</dimen> <dimen name="blocked_number_primary_text_size">16sp</dimen> <dimen name="blocked_number_secondary_text_size">12sp</dimen> <dimen name="blocked_number_delete_icon_size">32dp</dimen> <dimen name="blocked_number_search_text_size">14sp</dimen> - <dimen name="blocked_number_settings_description_text_size">16sp</dimen> + <dimen name="blocked_number_settings_description_text_size">14sp</dimen> + <dimen name="blocked_number_header_height">48dp</dimen> <dimen name="call_type_icon_size">12dp</dimen> </resources> diff --git a/res/values/strings.xml b/res/values/strings.xml index 0d79d9d46..2838e6816 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -526,13 +526,13 @@ <!-- Confirmation dialog message for blocking a number with visual voicemail active. [CHAR LIMIT=NONE] --> <string name="block_number_confirmation_message_vvm"> - Future calls from this number will be blocked and voicemails will be automatically deleted. + Calls from this number will be blocked and voicemails will be automatically deleted. </string> <!-- Confirmation dialog message for blocking a number with no visual voicemail. [CHAR LIMIT=NONE] --> <string name="block_number_confirmation_message_no_vvm"> - Future calls from this number will be blocked. Voicemails may still reach you. + Calls from this number will be blocked, but the caller may still be able to leave you voicemails. </string> <!-- Block number alert dialog button [CHAR LIMIT=32] --> @@ -898,13 +898,13 @@ <!-- Footer message of number blocking screen with visual voicemail active. [CHAR LIMIT=NONE] --> <string name="block_number_footer_message_vvm"> - Adding a number blocks all future calls and voicemails will be automatically deleted. + Calls from these numbers will be blocked and voicemails will be automatically deleted. </string> <!-- Footer message of number blocking screen with no visual voicemail. [CHAR LIMIT=NONE] --> <string name="block_number_footer_message_no_vvm"> - Adding a number blocks all future calls. Voicemails may still reach you. + Calls from these numbers will be blocked, but they may still be able to leave you voicemails. </string> <!-- Heading for the block list in the "Spam and blocked cal)ls" settings. [CHAR LIMIT=64] --> diff --git a/res/values/styles.xml b/res/values/styles.xml index d3d160da4..8c2726506 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -319,7 +319,7 @@ </style> <style name="BlockedNumbersDescriptionTextStyle"> - <item name="android:lineSpacingMultiplier">1.2</item> + <item name="android:lineSpacingMultiplier">1.43</item> <item name="android:paddingTop">8dp</item> <item name="android:paddingBottom">8dp</item> <item name="android:textSize">@dimen/blocked_number_settings_description_text_size</item> |