diff options
author | Nancy Chen <nancychen@google.com> | 2015-06-24 17:37:16 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-06-24 17:38:06 +0000 |
commit | 66e297ac1fa18ceef625ac2e61405e5a724a7e60 (patch) | |
tree | cfa8c2288ff44dad130f71851817d5c75f5d81f3 /res | |
parent | c77fd5c935c301d693f34c9f9fb037c09b8101c6 (diff) | |
parent | bdd2bc2efe22dc5b14cd2d3f5eb20350b69da875 (diff) |
Merge "Add a promo card for visual voicemail." into mnc-dev
Diffstat (limited to 'res')
-rw-r--r-- | res/layout/voicemail_promo_card.xml | 99 | ||||
-rw-r--r-- | res/values/colors.xml | 5 | ||||
-rw-r--r-- | res/values/dimens.xml | 11 | ||||
-rw-r--r-- | res/values/styles.xml | 14 |
4 files changed, 129 insertions, 0 deletions
diff --git a/res/layout/voicemail_promo_card.xml b/res/layout/voicemail_promo_card.xml new file mode 100644 index 000000000..103fa30b3 --- /dev/null +++ b/res/layout/voicemail_promo_card.xml @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright 2015 Google Inc. All Rights Reserved. --> + +<android.support.v7.widget.CardView + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:card_view="http://schemas.android.com/apk/res-auto" + android:id="@+id/promo_card" + style="@style/CallLogCardStyle" + android:orientation="vertical" + android:gravity="center_vertical" + card_view:cardBackgroundColor="@color/visual_voicemail_promo_card_background"> + + <LinearLayout + android:id="@+id/promo_card_content" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingStart="@dimen/promo_card_start_padding" + android:paddingEnd="@dimen/promo_card_main_padding" + android:paddingTop="@dimen/promo_card_top_padding" + android:paddingBottom="@dimen/promo_card_main_padding" + android:orientation="horizontal" + android:gravity="top"> + + <ImageView + android:id="@+id/promo_card_icon" + android:layout_width="@dimen/promo_card_icon_size" + android:layout_height="@dimen/promo_card_icon_size" + android:layout_gravity="top" + android:src="@drawable/ic_voicemail_24dp"/> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/promo_card_main_padding" + android:orientation="vertical" + android:gravity="center_vertical"> + + <TextView + android:id="@+id/promo_card_header" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/promo_card_title_padding" + android:layout_gravity="center_vertical" + android:textColor="@color/background_dialer_white" + android:textSize="@dimen/call_log_primary_text_size" + android:textStyle="bold" + android:text="@string/visual_voicemail_title" + android:singleLine="false"/> + + <TextView + android:id="@+id/promo_card_details" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="@color/background_dialer_white" + android:textSize="@dimen/call_log_secondary_text_size" + android:text="@string/visual_voicemail_text" + android:lineSpacingExtra="@dimen/promo_card_line_spacing" + android:singleLine="false"/> + </LinearLayout> + </LinearLayout> + + <View + android:layout_width="match_parent" + android:layout_height="1dp" + android:background="@color/visual_voicemail_promo_card_divider"/> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingEnd="@dimen/promo_card_action_end_padding" + android:paddingTop="@dimen/promo_card_action_vertical_padding" + android:paddingBottom="@dimen/promo_card_action_vertical_padding" + android:orientation="horizontal" + android:gravity="end"> + + <TextView + android:id="@+id/settings_action" + style="@style/PromoCardActionStyle" + android:background="?android:attr/selectableItemBackground" + android:text="@string/visual_voicemail_settings" + android:nextFocusLeft="@+id/promo_card" + android:nextFocusRight="@+id/ok_action" + android:paddingEnd="@dimen/promo_card_action_between_padding"/> + + <TextView + android:id="@+id/ok_action" + style="@style/PromoCardActionStyle" + android:background="?android:attr/selectableItemBackground" + android:text="@android:string/ok" + android:nextFocusLeft="@+id/settings_action" + android:nextFocusRight="@+id/promo_card"/> + </LinearLayout> + </LinearLayout> +</android.support.v7.widget.CardView> diff --git a/res/values/colors.xml b/res/values/colors.xml index f83c3284c..c3b0fb5bc 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -36,6 +36,11 @@ <!-- Color of the text describing an unconsumed voicemail. --> <color name="call_log_voicemail_highlight_color">#33b5e5</color> + <!-- Background color of visual voicemail promo card. --> + <color name="visual_voicemail_promo_card_background">#673ab7</color> + <color name="visual_voicemail_promo_card_divider">#7d57c1</color> + <color name="promo_card_text">#ffffff</color> + <!-- Tint of the recent card phone icon; 30% black --> <color name="call_log_list_item_primary_action_icon_tint">#4d000000</color> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index bcde855b5..206b44740 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -134,4 +134,15 @@ <dimen name="preference_summary_line_spacing_extra">4dp</dimen> <dimen name="call_log_list_item_primary_action_dimen">36dp</dimen> + + <!-- Dimensions for promo cards --> + <dimen name="promo_card_icon_size">24dp</dimen> + <dimen name="promo_card_start_padding">16dp</dimen> + <dimen name="promo_card_top_padding">21dp</dimen> + <dimen name="promo_card_main_padding">24dp</dimen> + <dimen name="promo_card_title_padding">12dp</dimen> + <dimen name="promo_card_action_vertical_padding">4dp</dimen> + <dimen name="promo_card_action_end_padding">4dp</dimen> + <dimen name="promo_card_action_between_padding">11dp</dimen> + <dimen name="promo_card_line_spacing">4dp</dimen> </resources> diff --git a/res/values/styles.xml b/res/values/styles.xml index dab5c6aa1..7d5d42f8f 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -218,4 +218,18 @@ <item name="cardCornerRadius">2dp</item> <item name="cardBackgroundColor">@color/background_dialer_call_log_list_item</item> </style> + + <style name="PromoCardActionStyle"> + <item name="android:layout_width">wrap_content</item> + <item name="android:layout_height">@dimen/call_log_action_height</item> + <item name="android:gravity">end|center_vertical</item> + <item name="android:paddingStart">@dimen/call_log_action_horizontal_padding</item> + <item name="android:paddingEnd">@dimen/call_log_action_horizontal_padding</item> + <item name="android:textColor">@color/promo_card_text</item> + <item name="android:textSize">@dimen/call_log_list_item_actions_text_size</item> + <item name="android:fontFamily">"sans-serif-medium"</item> + <item name="android:focusable">true</item> + <item name="android:singleLine">true</item> + <item name="android:textAllCaps">true</item> + </style> </resources> |