diff options
author | Tyler Gunn <tgunn@google.com> | 2014-06-09 10:20:57 -0700 |
---|---|---|
committer | Tyler Gunn <tgunn@google.com> | 2014-06-09 10:20:57 -0700 |
commit | 18164c85000ad4049b787051b3ab472d2901c586 (patch) | |
tree | 6d7495021be61a96000ae616921b55be92ad53c6 /res/layout | |
parent | aa3350fe6fc21945e52f4a1096e68e73757ad2bf (diff) |
Applying call details red-lines.
- Contact photo is now quick-contact which invokes quick-contact view.
- Removed send MS and call affordances, along with scrolling effect.
- Added missing accessibility strings to voicemail controls.
Bug: 15328410
Change-Id: I6d78d582af8c3a5cea8e051911cf3be763df2a36
Diffstat (limited to 'res/layout')
-rw-r--r-- | res/layout/call_detail.xml | 237 | ||||
-rw-r--r-- | res/layout/call_detail_history_header.xml | 52 | ||||
-rw-r--r-- | res/layout/call_detail_history_item.xml | 11 | ||||
-rw-r--r-- | res/layout/call_log_list_item.xml | 4 | ||||
-rw-r--r-- | res/layout/playback_layout.xml | 8 |
5 files changed, 94 insertions, 218 deletions
diff --git a/res/layout/call_detail.xml b/res/layout/call_detail.xml index 53f6b8ddb..9ca30a898 100644 --- a/res/layout/call_detail.xml +++ b/res/layout/call_detail.xml @@ -13,35 +13,68 @@ See the License for the specific language governing permissions and limitations under the License. --> - <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:ex="http://schemas.android.com/apk/res-auto" - android:id="@+id/call_detail" android:layout_width="match_parent" - android:layout_height="match_parent" - android:visibility="gone" -> - <!-- - The list view is under everything. - It contains a first header element which is hidden under the controls UI. - When scrolling, the controls move up until the name bar hits the top. - --> - <ListView - android:id="@+id/history" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_alignParentStart="true" - android:layout_alignParentTop="true" - /> + android:layout_height="match_parent"> - <!-- All the controls which are part of the pinned header are in this layout. --> - <RelativeLayout - android:id="@+id/controls" + <LinearLayout + android:id="@+id/call_detail" android:layout_width="match_parent" android:layout_height="match_parent" + android:orientation="vertical" + android:background="@color/background_dialer_list_items" android:layout_alignParentStart="true" android:layout_alignParentTop="true" > + <!-- Caller information "card" --> + <LinearLayout + android:id="@+id/caller_information" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingStart="@dimen/call_detail_horizontal_margin" + android:paddingTop="@dimen/call_detail_top_margin" + android:paddingBottom="@dimen/call_detail_bottom_margin" + android:baselineAligned="false" + android:orientation="horizontal" + android:gravity="center_vertical" + android:translationZ="@dimen/call_detail_translation_z" + android:focusable="true" + android:background="@color/background_dialer_white"> + + <QuickContactBadge + android:id="@+id/quick_contact_photo" + android:layout_width="@dimen/contact_photo_size" + android:layout_height="@dimen/contact_photo_size" + android:layout_alignParentStart="true" + android:focusable="true" + /> + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + android:gravity="center_vertical" + android:layout_marginStart="@dimen/call_detail_horizontal_margin" + > + <TextView + android:id="@+id/caller_name" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="?attr/call_log_primary_text_color" + android:textSize="@dimen/call_log_primary_text_size" + android:singleLine="true" + /> + <TextView + android:id="@+id/caller_number" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="?attr/call_log_secondary_text_color" + android:textSize="@dimen/call_log_secondary_text_size" + android:singleLine="true" + /> + </LinearLayout> + </LinearLayout> + <FrameLayout android:id="@+id/voicemail_status" android:layout_width="match_parent" @@ -49,157 +82,33 @@ android:layout_alignParentStart="true" android:layout_alignParentTop="true" android:visibility="gone" - > + > <include layout="@layout/call_log_voicemail_status"/> </FrameLayout> - - <view - class="com.android.contacts.common.widget.ProportionalLayout" - android:id="@+id/contact_background_sizer" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_alignParentStart="true" - android:layout_below="@id/voicemail_status" - ex:ratio="0.5" - ex:direction="widthToHeight" - > - <ImageView - android:id="@+id/contact_background" - android:layout_width="match_parent" - android:layout_height="0dip" - android:adjustViewBounds="true" - android:scaleType="centerCrop" - /> - </view> - - <LinearLayout - android:id="@+id/separator" - android:layout_width="match_parent" - android:layout_height="1dip" - android:background="@color/background_dialer_light" - android:layout_below="@+id/contact_background_sizer" - /> - <View - android:id="@+id/photo_text_bar" - android:layout_width="match_parent" - android:layout_height="42dip" - android:background="#7F000000" - android:layout_alignParentStart="true" - android:layout_alignBottom="@id/contact_background_sizer" - /> - <ImageView - android:id="@+id/main_action" - android:layout_width="wrap_content" - android:layout_height="0dip" - android:scaleType="center" - android:layout_alignEnd="@id/photo_text_bar" - android:layout_alignBottom="@id/photo_text_bar" - android:layout_alignTop="@id/photo_text_bar" - android:layout_marginEnd="@dimen/call_log_outer_margin" - /> - <TextView - android:id="@+id/header_text" - android:layout_width="wrap_content" - android:layout_height="0dip" - android:layout_alignStart="@id/photo_text_bar" - android:layout_toLeftOf="@id/main_action" - android:layout_alignTop="@id/photo_text_bar" - android:layout_alignBottom="@id/photo_text_bar" - android:layout_marginEnd="@dimen/call_log_inner_margin" - android:layout_marginStart="@dimen/call_detail_contact_name_margin" - android:gravity="center_vertical" - android:textColor="?attr/call_log_header_color" - android:textAppearance="?android:attr/textAppearanceMedium" - android:singleLine="true" - /> - <ImageButton - android:id="@+id/main_action_push_layer" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:layout_alignStart="@id/contact_background_sizer" - android:layout_alignTop="@id/contact_background_sizer" - android:layout_alignEnd="@id/contact_background_sizer" - android:layout_alignBottom="@id/contact_background_sizer" - android:background="?android:attr/selectableItemBackground" - /> <LinearLayout android:id="@+id/voicemail_container" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_below="@id/separator" - android:paddingBottom="@dimen/call_detail_button_spacing"> + android:orientation="horizontal" + android:paddingBottom="@dimen/call_detail_button_spacing" + android:visibility="gone" + > <!-- The voicemail fragment will be put here. --> </LinearLayout> - <FrameLayout - android:id="@+id/call_and_sms" - android:layout_width="match_parent" - android:layout_height="@dimen/call_log_list_item_height" - android:layout_marginBottom="@dimen/call_detail_button_spacing" - android:layout_below="@id/voicemail_container" - android:gravity="center_vertical" - android:background="@color/background_dialer_list_items" - > - - <LinearLayout - android:id="@+id/call_and_sms_main_action" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="horizontal" - android:focusable="true" - android:background="?android:attr/selectableItemBackground" - > - - <LinearLayout - android:layout_width="0dip" - android:layout_height="match_parent" - android:layout_weight="1" - android:paddingStart="@dimen/call_log_indent_margin" - android:orientation="vertical" - android:gravity="center_vertical" - > - - <TextView android:id="@+id/call_and_sms_text" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:paddingEnd="@dimen/call_log_icon_margin" - android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="?attr/call_log_primary_text_color" - android:singleLine="true" - android:ellipsize="end" - /> - <TextView android:id="@+id/call_and_sms_label" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:paddingEnd="@dimen/call_log_icon_margin" - android:textAppearance="?android:attr/textAppearanceSmall" - android:textColor="?attr/call_log_primary_text_color" - android:textAllCaps="true" - android:singleLine="true" - android:ellipsize="end" - /> - </LinearLayout> + <!-- + The list view is under everything. + It contains a first header element which is hidden under the controls UI. + When scrolling, the controls move up until the name bar hits the top. + --> + <ListView + android:id="@+id/history" + android:layout_width="match_parent" + android:layout_height="fill_parent" + /> - <View android:id="@+id/call_and_sms_divider" - android:layout_width="1px" - android:layout_height="32dip" - android:background="@color/background_dialer_light" - android:layout_gravity="center_vertical" - /> - <ImageView android:id="@+id/call_and_sms_icon" - android:layout_width="@color/call_log_voicemail_highlight_color" - android:layout_height="match_parent" - android:paddingStart="@dimen/call_log_inner_margin" - android:paddingEnd="@dimen/call_log_outer_margin" - android:gravity="center" - android:scaleType="centerInside" - android:focusable="true" - android:background="?android:attr/selectableItemBackground" - /> - </LinearLayout> - </FrameLayout> - </RelativeLayout> + </LinearLayout> <!-- Used to hide the UI when playing a voicemail and the proximity sensor is detecting something near the screen. @@ -208,10 +117,10 @@ android:id="@+id/blank" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_alignParentStart="true" - android:layout_alignParentTop="true" android:background="@android:color/black" android:visibility="gone" android:clickable="true" - /> + android:layout_alignParentStart="true" + android:layout_alignParentTop="true" + /> </RelativeLayout> diff --git a/res/layout/call_detail_history_header.xml b/res/layout/call_detail_history_header.xml index 40f943b1e..b4b63fb35 100644 --- a/res/layout/call_detail_history_header.xml +++ b/res/layout/call_detail_history_header.xml @@ -14,48 +14,16 @@ limitations under the License. --> -<!-- This layout is supposed to match the content of the controls in call_detail.xml --> -<LinearLayout +<TextView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ex="http://schemas.android.com/apk/res-auto" - android:orientation="vertical" - android:layout_width="match_parent" - android:layout_height="wrap_content"> - - <!-- Contact photo. --> - <view - class="com.android.contacts.common.widget.ProportionalLayout" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_alignParentStart="true" - android:layout_below="@id/voicemail_status" - ex:ratio="0.5" - ex:direction="widthToHeight" - > - <!-- Proportional layout requires a view in it. --> - <View - android:layout_width="wrap_content" - android:layout_height="wrap_content" - /> - </view> - <!-- Separator line --> - <View - android:layout_width="match_parent" - android:layout_height="1dip" - /> - <!-- Voicemail controls --> - <!-- TODO: Make the height be based on a constant. --> - <View - android:id="@+id/header_voicemail_container" - android:layout_width="match_parent" - android:layout_height="140dip" - android:layout_marginBottom="@dimen/call_detail_button_spacing" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingTop="@dimen/call_detail_header_top_margin" + android:paddingStart="@dimen/call_detail_horizontal_margin" + android:textColor="?attr/call_log_secondary_text_color" + android:textSize="@dimen/call_log_secondary_text_size" + android:fontFamily="sans-serif-medium" + android:singleLine="true" + android:text="@string/call_detail_list_header" /> - <!-- Call and SMS --> - <View - android:id="@+id/header_call_and_sms_container" - android:layout_width="match_parent" - android:layout_height="@dimen/call_log_list_item_height" - /> - -</LinearLayout> diff --git a/res/layout/call_detail_history_item.xml b/res/layout/call_detail_history_item.xml index 5b3fff712..cc06d2151 100644 --- a/res/layout/call_detail_history_item.xml +++ b/res/layout/call_detail_history_item.xml @@ -18,10 +18,9 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" - android:minHeight="@dimen/call_log_list_item_height" android:paddingTop="@dimen/call_log_inner_margin" android:paddingBottom="@dimen/call_log_inner_margin" - android:paddingStart="@dimen/call_log_indent_margin" + android:paddingStart="@dimen/call_detail_horizontal_margin" android:paddingEnd="@dimen/call_log_outer_margin" android:orientation="vertical" android:background="@color/background_dialer_list_items" @@ -43,22 +42,22 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="@dimen/call_log_icon_margin" - android:textAppearance="?android:attr/textAppearanceSmall" - android:textColor="?attr/call_log_secondary_text_color" + android:textColor="?attr/call_log_primary_text_color" + android:textSize="@dimen/call_log_primary_text_size" /> </LinearLayout> <TextView android:id="@+id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="?attr/call_log_secondary_text_color" + android:textSize="@dimen/call_log_secondary_text_size" /> <TextView android:id="@+id/duration" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="?attr/call_log_secondary_text_color" + android:textSize="@dimen/call_log_secondary_text_size" /> </LinearLayout> diff --git a/res/layout/call_log_list_item.xml b/res/layout/call_log_list_item.xml index 411af70e7..3748967f6 100644 --- a/res/layout/call_log_list_item.xml +++ b/res/layout/call_log_list_item.xml @@ -64,8 +64,8 @@ android:nextFocusLeft="@+id/quick_contact_photo" > <QuickContactBadge android:id="@+id/quick_contact_photo" - android:layout_width="@dimen/call_log_list_contact_photo_size" - android:layout_height="@dimen/call_log_list_contact_photo_size" + android:layout_width="@dimen/contact_photo_size" + android:layout_height="@dimen/contact_photo_size" android:nextFocusRight="@id/primary_action_view" android:layout_alignParentStart="true" android:focusable="true" diff --git a/res/layout/playback_layout.xml b/res/layout/playback_layout.xml index 01ed2e919..aa3ab4788 100644 --- a/res/layout/playback_layout.xml +++ b/res/layout/playback_layout.xml @@ -18,7 +18,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@color/background_dialer_light" + android:background="@color/background_dialer_list_items" > <!-- Mute, playback, trash buttons. --> <LinearLayout @@ -33,7 +33,6 @@ android:layout_height="58dip" android:layout_marginEnd="@dimen/call_detail_button_spacing" android:layout_weight="1" - android:background="@color/background_dialer_list_items" > <ImageButton android:id="@+id/playback_start_stop" @@ -41,6 +40,7 @@ android:layout_height="match_parent" android:background="?android:attr/selectableItemBackground" android:src="@drawable/ic_hold_pause" + android:contentDescription="@string/voicemail_play_start_pause" /> </LinearLayout> <LinearLayout @@ -64,7 +64,6 @@ android:layout_height="80dip" android:layout_below="@id/buttons_linear_layout" android:layout_marginTop="@dimen/call_detail_button_spacing" - android:background="@color/background_dialer_list_items" > <!-- SeekBar left-right margin decreased from redlines 72dip by 8dip to account for half thumb width (thumb is 16dip). @@ -117,6 +116,7 @@ android:paddingTop="29dip" android:layout_alignParentStart="true" android:layout_centerVertical="true" + android:contentDescription="@string/voicemail_play_slower" /> <ImageButton android:id="@+id/rate_increase_button" @@ -128,11 +128,11 @@ android:paddingTop="29dip" android:layout_alignParentEnd="true" android:layout_centerVertical="true" + android:contentDescription="@string/voicemail_play_faster" /> <View android:layout_width="match_parent" android:layout_height="2dp" - android:background="@color/background_dialer_light" android:layout_alignParentBottom="true"/> </RelativeLayout> </RelativeLayout> |