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