am f42d5c62
: Implement UI tweaks
* commit 'f42d5c6234bfb26f63a711fd59076964283fb7f0': Implement UI tweaks
BIN
res/drawable-hdpi/header_convo_view_sender_bg_holo.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
res/drawable-hdpi/ic_show_images_holo_light.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
res/drawable-hdpi/list_arrow_selected_holo.9.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
BIN
res/drawable-hdpi/list_selected_holo.9.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 574 B |
BIN
res/drawable-mdpi/header_convo_view_sender_bg_holo.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
res/drawable-mdpi/ic_show_images_holo_light.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
res/drawable-mdpi/list_arrow_selected_holo.9.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.0 KiB |
BIN
res/drawable-mdpi/list_selected_holo.9.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 432 B |
20
res/drawable/message_header_bg.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2011 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.
|
||||
-->
|
||||
|
||||
<bitmap
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:src="@drawable/header_convo_view_sender_bg_holo"
|
||||
android:tileMode="repeat" />
|
@ -17,9 +17,12 @@
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_focused="true"
|
||||
android:drawable="@drawable/list_message_focused_holo" />
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@drawable/list_message_pressed_holo" />
|
||||
<item android:state_selected="true"
|
||||
android:state_activated="true"
|
||||
android:drawable="@drawable/list_arrow_selected_holo" />
|
||||
<item android:state_activated="true"
|
||||
android:drawable="@drawable/message_list_activated_holo" />
|
||||
<item android:state_selected="true"
|
||||
android:drawable="@drawable/list_selected_holo" />
|
||||
<item android:drawable="@drawable/list_message_read_holo" />
|
||||
</selector>
|
||||
|
@ -19,7 +19,12 @@
|
||||
android:drawable="@drawable/list_message_focused_holo" />
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@drawable/list_message_pressed_holo" />
|
||||
<item android:state_selected="true"
|
||||
android:state_activated="true"
|
||||
android:drawable="@drawable/list_arrow_selected_holo" />
|
||||
<item android:state_activated="true"
|
||||
android:drawable="@drawable/message_list_activated_holo" />
|
||||
<item android:state_selected="true"
|
||||
android:drawable="@drawable/list_selected_holo" />
|
||||
<item android:drawable="@drawable/list_message_unread_holo" />
|
||||
</selector>
|
||||
|
@ -15,7 +15,7 @@
|
||||
-->
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@drawable/list_message_wide_read_pressed_holo" />
|
||||
<item android:state_selected="true"
|
||||
android:drawable="@drawable/list_conversation_wide_read_selected_holo" />
|
||||
<item android:drawable="@drawable/list_message_wide_read_normal_holo" />
|
||||
</selector>
|
||||
|
@ -17,5 +17,7 @@
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@drawable/list_message_wide_unread_pressed_holo" />
|
||||
<item android:state_selected="true"
|
||||
android:drawable="@drawable/list_conversation_wide_unread_selected_holo" />
|
||||
<item android:drawable="@drawable/list_message_wide_unread_normal_holo" />
|
||||
</selector>
|
||||
|
@ -43,17 +43,23 @@
|
||||
<TextView
|
||||
android:id="@+id/subject"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="40dip"
|
||||
android:layout_height="48dip"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginTop="0dip"
|
||||
android:layout_marginLeft="32dip"
|
||||
android:layout_marginRight="32dip"
|
||||
android:gravity="center_vertical"
|
||||
style="@style/message_view_subject"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/subject_divider"
|
||||
android:layout_marginBottom="16dip"
|
||||
android:layout_below="@id/subject"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginLeft="16dip"
|
||||
android:layout_marginRight="16dip"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:textSize="18dip"
|
||||
android:textColor="@color/text_primary_color"
|
||||
android:textStyle="bold"
|
||||
android:gravity="left|center_vertical"
|
||||
style="@style/message_view_horizontal_divider"
|
||||
/>
|
||||
|
||||
<!-- Badge -->
|
||||
@ -61,7 +67,7 @@
|
||||
android:id="@+id/badge"
|
||||
android:layout_width="64dip"
|
||||
android:layout_height="64dip"
|
||||
android:layout_below="@id/subject"
|
||||
android:layout_below="@id/subject_divider"
|
||||
android:layout_alignLeft="@id/subject"
|
||||
android:padding="0dip"
|
||||
android:scaleType="fitCenter"
|
||||
@ -71,21 +77,11 @@
|
||||
android:id="@+id/header_background"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="64dip"
|
||||
android:layout_below="@id/subject"
|
||||
android:layout_below="@id/subject_divider"
|
||||
android:layout_toRightOf="@id/badge"
|
||||
android:layout_alignRight="@id/subject"
|
||||
android:background="@drawable/message_header_bg"
|
||||
/>
|
||||
<!-- Fold -->
|
||||
<ImageView
|
||||
android:id="@+id/header_background_fold"
|
||||
android:layout_width="32dip"
|
||||
android:layout_height="20dip"
|
||||
android:layout_below="@id/header_background"
|
||||
android:layout_alignRight="@id/header_background"
|
||||
android:src="@drawable/message_header_fold"
|
||||
android:padding="0dip"
|
||||
/>
|
||||
|
||||
<!--
|
||||
reply, reply-all, forward, Star
|
||||
@ -98,7 +94,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dip"
|
||||
android:layout_marginLeft="0dip"
|
||||
android:layout_marginRight="24dip"
|
||||
android:layout_alignTop="@id/header_background"
|
||||
android:layout_alignRight="@id/header_background"
|
||||
android:orientation="horizontal"
|
||||
@ -126,33 +121,31 @@
|
||||
/>
|
||||
<ImageButton
|
||||
android:id="@+id/favorite"
|
||||
android:layout_marginRight="16dip"
|
||||
android:src="@drawable/btn_star_off_normal_email_holo_light"
|
||||
android:visibility="gone"
|
||||
style="@style/message_view_action_buttons"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<!-- presence, sender address, sender name: make them center_vertical -->
|
||||
<LinearLayout
|
||||
android:id="@+id/presence_from_name"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="0dip"
|
||||
android:layout_marginLeft="32dip"
|
||||
android:layout_marginRight="16dip"
|
||||
android:layout_alignTop="@id/header_background"
|
||||
android:layout_alignBottom="@id/header_background"
|
||||
android:layout_alignLeft="@id/header_background"
|
||||
android:layout_toLeftOf="@id/forward_reply_buttons"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
<LinearLayout
|
||||
android:id="@+id/presence_from_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="left|center_vertical"
|
||||
android:gravity="center|center_vertical"
|
||||
>
|
||||
<!-- Presence icon -->
|
||||
<ImageView
|
||||
@ -160,36 +153,34 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:layout_marginLeft="8dip"
|
||||
android:layout_marginRight="8dip"
|
||||
android:src="@android:drawable/presence_offline"
|
||||
/>
|
||||
|
||||
<!-- Sender display name -->
|
||||
<TextView
|
||||
android:id="@+id/from_name"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="4dip"
|
||||
android:textSize="18dip"
|
||||
android:textColor="@color/text_primary_color"
|
||||
android:textStyle="bold"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:gravity="left|center_vertical"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- From address -->
|
||||
<TextView
|
||||
android:id="@+id/from_address"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dip"
|
||||
android:layout_marginLeft="40dip"
|
||||
android:textSize="14dip"
|
||||
android:textColor="@color/text_secondary_color"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:paddingRight="6dip"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
@ -197,10 +188,10 @@
|
||||
<Button
|
||||
android:id="@+id/show_details"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dip"
|
||||
android:layout_height="48dip"
|
||||
android:layout_below="@id/header_background"
|
||||
android:layout_toLeftOf="@id/header_background_fold"
|
||||
android:layout_marginRight="16dip"
|
||||
android:layout_alignRight="@id/header_background"
|
||||
android:layout_marginRight="14dip"
|
||||
style="@android:style/Widget.Holo.Button.Borderless"
|
||||
android:padding="0dip"
|
||||
android:gravity="center_vertical"
|
||||
@ -215,10 +206,11 @@
|
||||
android:text="@string/message_view_show_details"
|
||||
android:id="@+id/datetime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dip"
|
||||
android:layout_height="48dip"
|
||||
android:layout_below="@id/header_background"
|
||||
android:layout_alignRight="@id/header_background"
|
||||
android:layout_toLeftOf="@id/show_details"
|
||||
android:layout_marginRight="48dip"
|
||||
android:layout_marginRight="156dip"
|
||||
android:gravity="center_vertical"
|
||||
android:textSize="14dip"
|
||||
android:textColor="@color/text_ternary_color"
|
||||
@ -228,11 +220,12 @@
|
||||
<TextView
|
||||
android:id="@+id/addresses"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="40dip"
|
||||
android:layout_height="48dip"
|
||||
android:layout_below="@id/header_background"
|
||||
android:layout_alignLeft="@id/badge"
|
||||
android:layout_toLeftOf="@id/datetime"
|
||||
android:layout_marginRight="16dip"
|
||||
android:layout_marginLeft="14dip"
|
||||
android:gravity="center_vertical"
|
||||
android:textSize="14dip"
|
||||
android:textColor="@color/text_ternary_color"
|
||||
@ -241,11 +234,11 @@
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/below_address_divider"
|
||||
android:id="@+id/address_divider"
|
||||
android:layout_width="0dip"
|
||||
android:layout_below="@id/show_details"
|
||||
android:layout_alignLeft="@id/addresses"
|
||||
android:layout_alignRight="@id/show_details"
|
||||
android:layout_alignLeft="@id/badge"
|
||||
android:layout_alignRight="@id/header_background"
|
||||
style="@style/message_view_horizontal_divider"
|
||||
/>
|
||||
|
||||
@ -256,7 +249,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="0dip"
|
||||
android:layout_below="@id/below_address_divider"
|
||||
android:layout_below="@id/address_divider"
|
||||
android:layout_alignLeft="@id/badge"
|
||||
android:layout_alignRight="@id/header_background"
|
||||
android:layout_alignParentBottom="true"
|
||||
@ -273,6 +266,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dip"
|
||||
android:layout_marginLeft="14dip"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
<Button
|
||||
@ -320,16 +314,17 @@
|
||||
android:id="@+id/show_pictures"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_gravity="right"
|
||||
style="@android:style/Widget.Holo.Button.Borderless"
|
||||
android:padding="0dip"
|
||||
android:text="@string/message_view_show_pictures_action"
|
||||
android:textSize="14dip"
|
||||
android:textColor="@color/text_ternary_color"
|
||||
android:textStyle="bold"
|
||||
android:drawableRight="@drawable/ic_show_images_holo_light"
|
||||
android:drawablePadding="8dip"
|
||||
/>
|
||||
<View
|
||||
android:layout_width="48dip"
|
||||
android:layout_width="16dip"
|
||||
android:layout_height="0dip"
|
||||
/>
|
||||
</LinearLayout>
|
||||
@ -352,6 +347,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="14dip"
|
||||
android:layout_marginRight="14dip"
|
||||
android:background="#ffffffff"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
@ -364,6 +361,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="14dip"
|
||||
android:layout_marginRight="14dip"
|
||||
android:visibility="gone"
|
||||
>
|
||||
<include layout="@layout/message_view_invitation" />
|
||||
@ -375,6 +374,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="14dip"
|
||||
android:layout_marginRight="14dip"
|
||||
android:visibility="gone"
|
||||
>
|
||||
<LinearLayout
|
||||
|
@ -55,7 +55,7 @@
|
||||
|
||||
<!-- Message view -->
|
||||
<style name="message_view_horizontal_divider">
|
||||
<item name="android:layout_height">1dip</item>
|
||||
<item name="android:layout_height">2dip</item>
|
||||
<item name="android:background">?android:attr/dividerHorizontal</item>
|
||||
</style>
|
||||
|
||||
|
@ -93,4 +93,12 @@
|
||||
<item name="android:singleLine">false</item>
|
||||
<item name="android:textIsSelectable">true</item>
|
||||
</style>
|
||||
|
||||
<style name="message_view_subject">
|
||||
<item name="android:textSize">18dip</item>
|
||||
<item name="android:textColor">@color/text_primary_color</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:enabled">false</item>
|
||||
<item name="android:ellipsize">end</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
@ -395,6 +395,7 @@ public class MessageListItem extends View {
|
||||
@Override
|
||||
public void draw(Canvas canvas) {
|
||||
// Update the background, before View.draw() draws it.
|
||||
setSelected(mAdapter.isSelected(this));
|
||||
updateBackground();
|
||||
super.draw(canvas);
|
||||
}
|
||||
|