diff options
author | Ben Komalo <benkomalo@google.com> | 2011-09-28 15:33:20 -0700 |
---|---|---|
committer | Ben Komalo <benkomalo@google.com> | 2011-09-28 17:41:30 -0700 |
commit | fb83cef9ade8b4295bffff44be5b2e4af5a30eff (patch) | |
tree | ea3c41b531e3f1edfe58c2f68d2a9ce1f2780d86 /res | |
parent | 8f56f41a0774c0b52ad36b75656caad9696e2774 (diff) | |
download | android_packages_apps_Email-fb83cef9ade8b4295bffff44be5b2e4af5a30eff.tar.gz android_packages_apps_Email-fb83cef9ade8b4295bffff44be5b2e4af5a30eff.tar.bz2 android_packages_apps_Email-fb83cef9ade8b4295bffff44be5b2e4af5a30eff.zip |
Hide attachment progress bar on complete.
Also fix up styles to (mostly) match mocks and be consistent
with Gmail
Bug: 5205957
Change-Id: Iea7e9706464a8050255a7be78fca471cb7f9f6cf
Diffstat (limited to 'res')
-rw-r--r-- | res/color/buttontext.xml | 4 | ||||
-rw-r--r-- | res/drawable-hdpi/attachment_bg_holo.9.png | bin | 0 -> 288 bytes | |||
-rw-r--r-- | res/drawable-mdpi/attachment_bg_holo.9.png | bin | 0 -> 266 bytes | |||
-rw-r--r-- | res/drawable-xhdpi/attachment_bg_holo.9.png | bin | 0 -> 391 bytes | |||
-rw-r--r-- | res/layout-sw600dp/message_view_attachment.xml | 73 | ||||
-rw-r--r-- | res/layout-sw600dp/message_view_fragment.xml | 1 | ||||
-rw-r--r-- | res/layout/message_view_attachment.xml | 143 | ||||
-rw-r--r-- | res/values-sw600dp/styles.xml | 1 | ||||
-rw-r--r-- | res/values/colors.xml | 3 | ||||
-rw-r--r-- | res/values/styles.xml | 8 |
10 files changed, 122 insertions, 111 deletions
diff --git a/res/color/buttontext.xml b/res/color/buttontext.xml index 8b88da8af..25aca0d14 100644 --- a/res/color/buttontext.xml +++ b/res/color/buttontext.xml @@ -15,6 +15,6 @@ --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:state_enabled="false" android:color="@color/text_disabled_color" /> - <item android:color="@color/text_primary_color" /> + <item android:state_enabled="false" android:color="@color/button_text_disabled_color" /> + <item android:color="@color/button_text_color" /> </selector> diff --git a/res/drawable-hdpi/attachment_bg_holo.9.png b/res/drawable-hdpi/attachment_bg_holo.9.png Binary files differnew file mode 100644 index 000000000..43983c5fe --- /dev/null +++ b/res/drawable-hdpi/attachment_bg_holo.9.png diff --git a/res/drawable-mdpi/attachment_bg_holo.9.png b/res/drawable-mdpi/attachment_bg_holo.9.png Binary files differnew file mode 100644 index 000000000..040bbd04d --- /dev/null +++ b/res/drawable-mdpi/attachment_bg_holo.9.png diff --git a/res/drawable-xhdpi/attachment_bg_holo.9.png b/res/drawable-xhdpi/attachment_bg_holo.9.png Binary files differnew file mode 100644 index 000000000..b59af1df1 --- /dev/null +++ b/res/drawable-xhdpi/attachment_bg_holo.9.png diff --git a/res/layout-sw600dp/message_view_attachment.xml b/res/layout-sw600dp/message_view_attachment.xml index b342d200d..77062169e 100644 --- a/res/layout-sw600dp/message_view_attachment.xml +++ b/res/layout-sw600dp/message_view_attachment.xml @@ -21,15 +21,31 @@ android:layout_width="match_parent" android:layout_height="64dip" android:orientation="horizontal" + android:background="@drawable/attachment_bg_holo" > - <ImageView - android:id="@+id/attachment_icon" + <FrameLayout android:layout_width="64dip" - android:layout_height="match_parent" - android:layout_weight="0" - android:src="@drawable/ic_attachment_holo_light" - android:scaleType="fitCenter" - /> + android:layout_height="64dip" + android:orientation="vertical" + android:background="#e5e5e5" + > + <ImageView + android:id="@+id/attachment_icon" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:src="@drawable/ic_attachment_holo_light" + android:scaleType="center" + /> + <ProgressBar + android:id="@+id/progress" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:padding="0dip" + style="?android:attr/progressBarStyleHorizontal" + android:max="100" + android:visibility="invisible" + /> + </FrameLayout> <LinearLayout android:layout_width="0dip" android:layout_height="match_parent" @@ -41,49 +57,31 @@ > <RelativeLayout android:layout_width="0dip" - android:layout_height="match_parent" + android:layout_height="wrap_content" android:layout_weight="1" + android:layout_gravity="center_vertical" android:layout_marginLeft="32dip" android:layout_marginRight="16dip" > - <ProgressBar - android:id="@+id/progress" - android:layout_width="match_parent" - android:layout_height="16dip" - android:layout_alignParentBottom="true" - android:layout_alignParentLeft="true" - android:layout_alignParentRight="true" - android:layout_marginTop="2dip" - android:layout_marginBottom="6dip" - style="?android:attr/progressBarStyleHorizontal" - android:max="100" - android:visibility="invisible" - android:gravity="center" - /> <TextView - android:id="@+id/attachment_info" + android:id="@+id/attachment_name" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_alignParentRight="true" - android:layout_above="@id/progress" - android:layout_marginLeft="16dip" - android:textSize="14dip" - android:textColor="@color/text_secondary_color" + android:layout_alignParentLeft="true" + android:textSize="18dip" + android:textColor="#333333" android:singleLine="true" - android:gravity="right|bottom" + android:ellipsize="middle" /> <TextView - android:id="@+id/attachment_name" - android:layout_width="0dip" + android:id="@+id/attachment_info" + android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" - android:layout_toLeftOf="@id/attachment_info" - android:layout_above="@id/progress" - android:textSize="18dip" - android:textColor="@color/text_primary_color" + android:layout_below="@+id/attachment_name" + android:textSize="14sp" + android:textColor="@color/text_secondary_color" android:singleLine="true" - android:ellipsize="middle" - android:gravity="left|bottom" /> </RelativeLayout> @@ -95,7 +93,6 @@ android:orientation="horizontal" android:divider="?android:attr/dividerVertical" android:showDividers="middle" - android:dividerPadding="16dip" > <Button android:id="@+id/load" diff --git a/res/layout-sw600dp/message_view_fragment.xml b/res/layout-sw600dp/message_view_fragment.xml index dd93dab5c..e0bc2c9d4 100644 --- a/res/layout-sw600dp/message_view_fragment.xml +++ b/res/layout-sw600dp/message_view_fragment.xml @@ -219,7 +219,6 @@ android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@color/message_view_info_back_color" android:divider="?android:attr/dividerHorizontal" android:showDividers="beginning|middle|end" /> diff --git a/res/layout/message_view_attachment.xml b/res/layout/message_view_attachment.xml index 3266bf627..eeb159252 100644 --- a/res/layout/message_view_attachment.xml +++ b/res/layout/message_view_attachment.xml @@ -23,91 +23,100 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="horizontal" + android:orientation="vertical" + android:divider="?android:attr/dividerHorizontal" + android:showDividers="middle" + android:background="@drawable/attachment_bg_holo" > - <LinearLayout - android:layout_width="wrap_content" + <RelativeLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:orientation="vertical" + android:gravity="center_vertical" > - <ProgressBar - android:id="@+id/progress" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:padding="0dip" - style="?android:attr/progressBarStyleHorizontal" - android:max="100" - android:visibility="invisible" - /> - <ImageView - android:id="@+id/attachment_icon" + <FrameLayout + android:id="@+id/attachment_container" android:layout_width="48dip" android:layout_height="48dip" - android:src="@drawable/ic_attachment_holo_light" - /> - </LinearLayout> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:paddingLeft="8dip" - android:paddingRight="8dip" - android:orientation="vertical" - > + android:background="#e5e5e5" + > + <ImageView + android:id="@+id/attachment_icon" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:src="@drawable/ic_attachment_holo_light" + android:scaleType="center" + /> + <ProgressBar + android:id="@+id/progress" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:padding="0dip" + style="?android:attr/progressBarStyleHorizontal" + android:max="100" + android:visibility="invisible" + /> + </FrameLayout> <TextView android:id="@+id/attachment_name" - android:layout_width="match_parent" + android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_toRightOf="@+id/attachment_container" + android:layout_marginLeft="16dip" android:textAppearance="?android:attr/textAppearanceSmall" - android:textColor="?android:attr/textColorSecondaryInverse" + android:textColor="#333333" android:singleLine="true" android:ellipsize="middle" /> <TextView android:id="@+id/attachment_info" android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="match_parent" + android:layout_toRightOf="@+id/attachment_container" + android:layout_below="@+id/attachment_name" + android:layout_marginLeft="16dip" android:textAppearance="?android:attr/textAppearanceSmall" - android:textColor="?android:attr/textColorTertiaryInverse" + android:textColor="@color/text_secondary_color" android:singleLine="true" android:ellipsize="middle" /> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - > - <Button - android:id="@+id/load" - style="@style/Attachment.Button" - android:text="@string/message_view_attachment_load_action" - android:visibility="gone" - /> - <Button - android:id="@+id/cancel" - style="@style/Attachment.Button" - android:text="@string/message_view_attachment_cancel_action" - android:visibility="gone" - /> - <Button - android:id="@+id/info" - style="@style/Attachment.Button" - android:text="@string/message_view_attachment_info_action" - android:visibility="gone" - /> - <Button - android:id="@+id/save" - style="@style/Attachment.Button" - android:text="@string/message_view_attachment_save_action" - android:visibility="gone" - /> - <Button - android:id="@+id/open" - style="@style/Attachment.Button" - android:text="@string/message_view_attachment_view_action" - android:visibility="gone" - /> - </LinearLayout> + </RelativeLayout> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:divider="?android:attr/dividerVertical" + android:showDividers="middle" + android:dividerPadding="8dip" + > + <Button + android:id="@+id/load" + style="@style/Attachment.Button" + android:text="@string/message_view_attachment_load_action" + android:visibility="gone" + /> + <Button + android:id="@+id/cancel" + style="@style/Attachment.Button" + android:text="@string/message_view_attachment_cancel_action" + android:visibility="gone" + /> + <Button + android:id="@+id/info" + style="@style/Attachment.Button" + android:text="@string/message_view_attachment_info_action" + android:visibility="gone" + /> + <Button + android:id="@+id/save" + style="@style/Attachment.Button" + android:text="@string/message_view_attachment_save_action" + android:visibility="gone" + /> + <Button + android:id="@+id/open" + style="@style/Attachment.Button" + android:text="@string/message_view_attachment_view_action" + android:visibility="gone" + /> </LinearLayout> </LinearLayout> diff --git a/res/values-sw600dp/styles.xml b/res/values-sw600dp/styles.xml index 598fe4c5e..bc51240d4 100644 --- a/res/values-sw600dp/styles.xml +++ b/res/values-sw600dp/styles.xml @@ -162,6 +162,7 @@ <item name="android:singleLine">true</item> <item name="android:ellipsize">end</item> <item name="android:gravity">center</item> + <item name="android:textAllCaps">true</item> </style> <style name="message_list_item_normal"> diff --git a/res/values/colors.xml b/res/values/colors.xml index cccb853ac..f00f37eaf 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -34,6 +34,9 @@ <color name="text_ternary_color">#aaaaaa</color> <color name="text_disabled_color">#888888</color> + <color name="button_text_color">#777777</color> + <color name="button_text_disabled_color">#cccccc</color> + <!-- TODO: properly put these text colors in the theme and use selectors --> <color name="text_primary_color_inverse">#ffffff</color> <color name="text_secondary_color_inverse">#eeeeee</color> diff --git a/res/values/styles.xml b/res/values/styles.xml index 47d0b25bc..313f20a25 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -120,17 +120,19 @@ <style name="Attachment" /> - <style name="Attachment.Button" parent="@android:style/Widget.Holo.Button"> + <style name="Attachment.Button" parent="@android:style/Widget.Holo.Button.Borderless"> <item name="android:minHeight">0dip</item> <item name="android:layout_height">wrap_content</item> <item name="android:layout_width">0dip</item> <item name="android:layout_weight">1</item> <item name="android:layout_gravity">center_vertical</item> - <item name="android:paddingTop">2dip</item> - <item name="android:paddingBottom">2dip</item> + <item name="android:paddingTop">8dip</item> + <item name="android:paddingBottom">8dip</item> <item name="android:textAppearance">?android:attr/textAppearanceSmall</item> + <item name="android:textStyle">bold</item> <item name="android:textColor">@color/buttontext</item> <item name="android:singleLine">true</item> + <item name="android:textAllCaps">true</item> </style> <style name="attachment_container"> |