1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-25 00:58:50 -05:00

Overhaul message header display to scale reasonably with font-size

changes but not to waste lots of space unnecessarily.  The placement of
loading and attachment icons may want additional love. I'm not sure
where they might best be placed.
This commit is contained in:
Jesse Vincent 2010-05-03 00:20:19 +00:00
parent 8211b9be65
commit 5131dba71d

View File

@ -6,71 +6,57 @@
android:id="@+id/header_container"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#22cccccc" >
>
<View
android:id="@+id/chip"
android:layout_width="6dip"
android:layout_height="fill_parent" />
<LinearLayout
android:id="@+id/top_container"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingLeft="6dip"
android:paddingRight="6dip"
android:paddingTop="2dip"
android:paddingBottom="2dip"
android:orientation="vertical" >
android:orientation="vertical"
>
<LinearLayout
android:layout_width="fill_parent"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:gravity="fill_horizontal"
android:layout_height="wrap_content">
<LinearLayout android:id="@+id/people"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingLeft="4dip"
android:layout_weight="5"
android:orientation="vertical">
<TextView android:id="@+id/subject"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="10sp"
android:textStyle="bold"
android:textColor="?android:attr/textColorSecondary"
android:textAppearance="?android:attr/textAppearanceSmall" />
>
<LinearLayout
android:id="@+id/from_container"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:baselineAligned="true" >
<TextView
android:id="@+id/from"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingRight="6dip"
android:singleLine="true"
android:ellipsize="end"
android:textColor="?android:attr/textColorPrimary"
android:textAppearance="?android:attr/textAppearanceSmall" />
<View
android:id="@+id/attachment"
android:layout_width="22dip"
android:layout_height="22dip"
android:background="@drawable/ic_email_attachment_small" />
<View
android:id="@+id/downloading"
android:layout_width="22dip"
android:layout_height="22dip"
android:background="@drawable/ic_menu_reverse_sort"
android:visibility="gone" />
<TextView
android:id="@+id/date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginLeft="4dip"
android:gravity="bottom|right"
android:textSize="10sp"
android:textColor="?android:attr/textColorPrimary"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
<LinearLayout
android:id="@+id/to_container"
android:layout_width="fill_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:baselineAligned="true" >
<TextView
android:id="@+id/to_label"
android:layout_width="wrap_content"
@ -80,9 +66,7 @@
android:textSize="10sp"
android:textStyle="bold"
android:textColor="?android:attr/textColorSecondary" />
<TextView
android:id="@+id/to"
<TextView android:id="@+id/to"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
@ -91,26 +75,12 @@
android:textSize="10sp"
android:textColor="?android:attr/textColorSecondary"
android:textAppearance="?android:attr/textAppearanceSmall" />
<TextView
android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginLeft="4dip"
android:textSize="10sp"
android:textColor="?android:attr/textColorPrimary"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
<LinearLayout
android:id="@+id/cc_container"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/cc_label"
</LinearLayout>
<LinearLayout android:id="@+id/cc_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:baselineAligned="true">
<TextView android:id="@+id/cc_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="4dip"
@ -118,9 +88,7 @@
android:textSize="10sp"
android:textStyle="bold"
android:textColor="?android:attr/textColorSecondary" />
<TextView
android:id="@+id/cc"
<TextView android:id="@+id/cc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
@ -129,40 +97,55 @@
android:textSize="10sp"
android:textColor="?android:attr/textColorSecondary"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
</LinearLayout>
<LinearLayout android:id="@+id/topright_container"
android:orientation="vertical"
android:layout_weight="0.1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical" >
<TextView
android:id="@+id/subject"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:singleLine="false"
android:ellipsize="none"
>
<CheckBox android:id="@+id/flagged"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:layout_alignParentRight="true"
style="?android:attr/starStyle" />
<TextView android:id="@+id/date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:singleLine="true"
android:textSize="10sp"
android:textStyle="bold"
android:textColor="?android:attr/textColorSecondary"
android:textColor="?android:attr/textColorPrimary"
android:textAppearance="?android:attr/textAppearanceSmall" />
<CheckBox
android:id="@+id/flagged"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:focusable="false"
style="?android:attr/starStyle" />
<TextView android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:textSize="10sp"
android:singleLine="true"
android:textColor="?android:attr/textColorPrimary"
android:textAppearance="?android:attr/textAppearanceSmall" />
<LinearLayout android:id="@+id/icons_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:baselineAligned="true">
<View android:id="@+id/attachment"
android:layout_width="22sp"
android:layout_height="22sp"
android:background="@drawable/ic_email_attachment_small" />
<View android:id="@+id/downloading"
android:layout_width="22sp"
android:layout_height="22sp"
android:background="@drawable/ic_menu_reverse_sort"
android:visibility="gone" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/show_pictures_section"
android:layout_width="fill_parent"
@ -174,7 +157,6 @@
android:paddingBottom="4dip"
android:baselineAligned="false"
android:visibility="gone">
<TextView
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorSecondary"
@ -183,21 +165,16 @@
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1.0" />
<Button
android:id="@+id/show_pictures"
<Button android:id="@+id/show_pictures"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/message_view_show_pictures_action" />
</LinearLayout>
<!-- Content area -->
<WebView
android:id="@+id/message_content"
android:layout_height="wrap_content"
android:layout_width="fill_parent" />
<!-- Attachments area -->
<LinearLayout
android:id="@+id/attachments"
@ -205,5 +182,4 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="4dip" />
</merge>