Pixel perfect: newer/older buttons
We haven't gotten all dimensions yet, but this is what I inferred from the latest redlines. Also fixed a margin above the message area on message view. (Keep the margin even if there's no tabs.) Bug 3138021 Change-Id: Iafff578f499737674ec10206b75566377cf2383b
This commit is contained in:
parent
30d8dcbc32
commit
b6171541b6
|
@ -18,9 +18,11 @@
|
|||
Landscape, where we show no buttons.
|
||||
-->
|
||||
|
||||
<!-- extends RelativeLayout -->
|
||||
<!-- extends LinearLayout -->
|
||||
<com.android.email.activity.MessageCommandButtonView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dip"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
</com.android.email.activity.MessageCommandButtonView>
|
||||
|
|
|
@ -16,39 +16,51 @@
|
|||
|
||||
<!-- Portrait -->
|
||||
|
||||
<!-- extends RelativeLayout -->
|
||||
<!-- extends LinearLayout -->
|
||||
<com.android.email.activity.MessageCommandButtonView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dip"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="5dip"
|
||||
android:paddingLeft="4dip"
|
||||
android:paddingRight="4dip"
|
||||
android:paddingBottom="1dip"
|
||||
android:background="@android:drawable/bottom_bar"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="16dip"
|
||||
android:paddingRight="16dip"
|
||||
>
|
||||
<Button
|
||||
android:id="@+id/move_to_newer_button"
|
||||
android:text="@string/message_view_move_to_newer"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:minWidth="128dip"
|
||||
/>
|
||||
<!-- Filler -->
|
||||
<View
|
||||
android:layout_height="0dip"
|
||||
android:layout_width="0dip"
|
||||
android:layout_weight="1"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/message_position"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textSize="14dip"
|
||||
android:textColor="@color/text_secondary_color"
|
||||
android:singleLine="true"
|
||||
/>
|
||||
<!-- Filler -->
|
||||
<View
|
||||
android:layout_height="0dip"
|
||||
android:layout_width="0dip"
|
||||
android:layout_weight="1"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
<Button
|
||||
android:id="@+id/move_to_older_button"
|
||||
android:text="@string/message_view_move_to_older"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/message_position"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="0dip"
|
||||
android:layout_toRightOf="@id/move_to_newer_button"
|
||||
android:layout_toLeftOf="@id/move_to_older_button"
|
||||
android:gravity="center"
|
||||
android:layout_centerVertical="true"
|
||||
android:minWidth="128dip"
|
||||
/>
|
||||
</com.android.email.activity.MessageCommandButtonView>
|
||||
|
|
|
@ -343,11 +343,16 @@
|
|||
</LinearLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginBottom="16dip"
|
||||
style="@style/message_view_horizontal_divider"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- margin -->
|
||||
<View
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="16dip"
|
||||
/>
|
||||
|
||||
<!-- content area - only one of them is visible at a time -->
|
||||
<!-- Message body -->
|
||||
<WebView
|
||||
|
@ -400,8 +405,6 @@
|
|||
<include
|
||||
layout="@layout/message_command_button_view"
|
||||
android:id="@+id/message_command_buttons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
</LinearLayout>
|
|
@ -251,8 +251,6 @@
|
|||
<include
|
||||
layout="@layout/message_command_button_view"
|
||||
android:id="@+id/message_command_buttons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
|
|
@ -21,7 +21,7 @@ import com.android.email.R;
|
|||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
/**
|
||||
|
@ -31,7 +31,7 @@ import android.widget.TextView;
|
|||
* This class is meant to hide layout differences between portrait and landscape, if any.
|
||||
* e.g. We might combine some of the buttons when we have small real estate.
|
||||
*/
|
||||
public class MessageCommandButtonView extends RelativeLayout implements View.OnClickListener {
|
||||
public class MessageCommandButtonView extends LinearLayout implements View.OnClickListener {
|
||||
/**
|
||||
* If false, we don't want to show anything, in which case all fields holding a view
|
||||
* (e.g. {@link #mMoveToNewerButton}) are null.
|
||||
|
|
Loading…
Reference in New Issue