Tweak message header actions.

Once again, I missed an asset in the drop, since there is actually a
sepcialized one for the message view.

Also, use styles to fill out the entire height to the header to make the
touch targets bigger, as consistent with Gmail.

Bug: 5290357
Change-Id: I6754b3ef986dbf57c7c68bc595cf54cc9d76123a
This commit is contained in:
Ben Komalo 2011-09-12 12:35:03 -07:00
parent db8caf745b
commit afdec1caf1
13 changed files with 19 additions and 33 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 705 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 538 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 935 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -18,7 +18,7 @@
<ImageButton
android:id="@+id/favorite"
style="@style/message_view_action_buttons"
android:src="@drawable/btn_star_off_normal_holo_light"
android:src="@drawable/btn_star_off_convo_holo_light"
android:contentDescription="@string/favorite_action"
/>
<ImageButton
@ -34,12 +34,10 @@
android:contentDescription="@string/reply_all_action"
/>
<!-- Add extra margin on the right for the last action on landscape -->
<ImageButton
android:id="@+id/forward"
style="@style/message_view_action_buttons"
android:src="@drawable/ic_forward_holo_dark"
android:contentDescription="@string/forward_action"
android:layout_marginRight="24dip"
/>
</merge>

View File

@ -39,7 +39,7 @@
<ImageButton
android:id="@+id/favorite"
style="@style/message_view_action_buttons"
android:src="@drawable/btn_star_off_normal_holo_light"
android:src="@drawable/btn_star_off_convo_holo_light"
android:contentDescription="@string/favorite_action"
android:baselineAlignBottom="true"
/>

View File

@ -15,30 +15,22 @@
-->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<ImageButton
<ImageView
android:id="@+id/favorite"
style="@style/message_view_action_buttons"
android:src="@drawable/btn_star_off_normal_holo_light"
android:src="@drawable/btn_star_off_convo_holo_light"
android:contentDescription="@string/favorite_action"
/>
<ImageButton
<ImageView
android:id="@+id/reply"
style="@style/message_view_action_buttons"
android:src="@drawable/ic_reply_holo_dark"
android:contentDescription="@string/reply_action"
/>
<View
android:id="@+id/more_separator"
android:layout_width="1dip"
android:layout_height="24dip"
android:layout_margin="3dip"
android:background="#ddd"
/>
<ImageButton
<ImageView
android:id="@+id/more"
style="@android:style/Widget.Holo.ActionButton.Overflow"
android:layout_width="24dip"
android:layout_height="24dip"
android:layout_margin="6dip"
android:layout_width="48dip"
android:layout_height="match_parent"
/>
</merge>

View File

@ -106,6 +106,12 @@
<item name="android:singleLine">true</item>
</style>
<style name="message_view_action_buttons" parent="android:Widget.Holo.Button.Borderless">
<item name="android:layout_width">56dip</item>
<item name="android:layout_height">56dip</item>
<item name="android:scaleType">center</item>
</style>
<style name="message_header_sender_name">
<item name="android:textSize">18dip</item>
<item name="android:textColor">@color/text_primary_color_inverse</item>
@ -121,13 +127,6 @@
<item name="android:ellipsize">end</item>
</style>
<style name="message_view_action_buttons" parent="android:Widget.Holo.Button.Borderless">
<item name="android:layout_width">48dip</item>
<item name="android:layout_height">48dip</item>
<item name="android:layout_marginRight">16dip</item>
<item name="android:padding">8dip</item>
</style>
<style name="accountSetupTypePrevious" parent="@style/accountSetupButton">
<item name="android:layout_toRightOf">@+id/main_content"</item>
<item name="android:layout_alignParentRight">true</item>

View File

@ -281,11 +281,9 @@
</style>
<style name="message_view_action_buttons" parent="android:Widget.Holo.Button.Borderless">
<item name="android:layout_width">24dip</item>
<item name="android:layout_height">24dip</item>
<item name="android:layout_marginLeft">8dip</item>
<item name="android:layout_marginRight">8dip</item>
<item name="android:padding">2dip</item>
<item name="android:layout_width">48dip</item>
<item name="android:layout_height">48dip</item>
<item name="android:scaleType">center</item>
</style>
<style name="message_header_sender_name">

View File

@ -61,7 +61,6 @@ public class MessageFileViewFragment extends MessageViewFragmentBase {
UiUtilities.setVisibilitySafe(result, R.id.reply, View.GONE);
UiUtilities.setVisibilitySafe(result, R.id.reply_all, View.GONE);
UiUtilities.setVisibilitySafe(result, R.id.forward, View.GONE);
UiUtilities.setVisibilitySafe(result, R.id.more_separator, View.GONE);
UiUtilities.setVisibilitySafe(result, R.id.more, View.GONE);
return result;

View File

@ -177,8 +177,8 @@ public class MessageViewFragment extends MessageViewFragmentBase
setHasOptionsMenu(true);
final Resources res = getActivity().getResources();
mFavoriteIconOn = res.getDrawable(R.drawable.btn_star_on_normal_holo_light);
mFavoriteIconOff = res.getDrawable(R.drawable.btn_star_off_normal_holo_light);
mFavoriteIconOn = res.getDrawable(R.drawable.btn_star_on_convo_holo_light);
mFavoriteIconOff = res.getDrawable(R.drawable.btn_star_off_convo_holo_light);
}
@Override