1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-24 02:12:15 -05:00

Fix message header layout issues.

This commit is contained in:
Danny Baumann 2013-02-11 10:48:49 +01:00
parent ee65217ac3
commit 98737149c1

View File

@ -9,19 +9,18 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
android:id="@+id/subject" android:id="@+id/subject"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@+id/state_container"
android:maxLines="3" android:maxLines="3"
android:ellipsize="end" android:ellipsize="end"
android:textStyle="bold" android:textStyle="bold"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
android:textAppearance="?android:attr/textAppearanceMedium" android:textAppearance="?android:attr/textAppearanceMedium"
android:text="@string/general_no_subject" android:padding="8dp"/> android:text="@string/general_no_subject"
android:padding="8dp" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -37,14 +36,16 @@
<RelativeLayout <RelativeLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:orientation="vertical" android:layout_height="wrap_content"
android:layout_height="fill_parent" android:layout_gravity="center"> android:orientation="vertical">
<QuickContactBadge <QuickContactBadge
android:id="@+id/contact_badge"
android:layout_width="48dp" android:layout_width="48dp"
android:layout_height="48dp" android:layout_height="48dp"
android:id="@+id/contact_badge" android:layout_gravity="center|top" android:layout_marginTop="8dp"
android:layout_marginTop="8dp" android:layout_centerHorizontal="true" android:layout_marginLeft="8dp" />
android:layout_marginLeft="8dp"/>
<!-- State icons --> <!-- State icons -->
<LinearLayout <LinearLayout
android:id="@+id/icon_container" android:id="@+id/icon_container"
@ -52,9 +53,9 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="10dip" android:layout_marginTop="10dip"
android:layout_marginBottom="2dip" android:layout_marginBottom="2dip"
android:layout_gravity="center_vertical|right" android:layout_below="@+id/contact_badge"
android:orientation="vertical" android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_below="@+id/contact_badge"> android:orientation="vertical">
<View <View
android:id="@+id/answered" android:id="@+id/answered"
@ -71,11 +72,14 @@
android:background="@drawable/ic_email_forwarded_small"/> android:background="@drawable/ic_email_forwarded_small"/>
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:padding="6dip" android:layout_marginLeft="4dp"> android:layout_height="wrap_content"
android:padding="6dip"
android:layout_marginLeft="4dp">
<!-- From --> <!-- From -->
<TextView <TextView
@ -84,111 +88,109 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:paddingTop="0dp"
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/textAppearanceMedium" android:textAppearance="?android:attr/textAppearanceMedium"
android:paddingTop="0dp" android:textStyle="bold" android:text="@string/general_no_sender"/> android:textStyle="bold"
android:text="@string/general_no_sender" />
<!-- To --> <!-- To -->
<TextView <TextView
android:id="@+id/to_label"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignLeft="@+id/from"
android:layout_alignBaseline="@+id/to"
android:paddingTop="4dp"
android:paddingRight="4dp"
android:text="@string/message_to_label" android:text="@string/message_to_label"
android:id="@+id/to_label"
android:layout_alignParentLeft="true" android:layout_below="@+id/from"
android:textStyle="bold" android:gravity="right"
android:paddingRight="4dp" android:paddingTop="4dp"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
android:layout_alignRight="@+id/date_label"
android:textAppearance="@android:style/TextAppearance.Medium" android:textAppearance="@android:style/TextAppearance.Medium"
/> android:textStyle="bold" />
<TextView <TextView
android:id="@+id/to" 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_toRightOf="@+id/to_label"
android:layout_below="@+id/from"
android:maxLines="2" android:maxLines="2"
android:ellipsize="end" android:ellipsize="end"
android:textColor="?android:attr/textColorSecondary"
android:textAppearance="@android:style/TextAppearance.Medium"
android:paddingBottom="4dp" android:paddingBottom="4dp"
android:layout_toRightOf="@+id/to_label" android:layout_alignBaseline="@+id/to_label" android:textColor="?android:attr/textColorSecondary"
android:layout_alignTop="@+id/to_label"/> android:textAppearance="@android:style/TextAppearance.Medium" />
<!-- CC --> <!-- CC -->
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/message_view_cc_label" <TextView
android:id="@+id/cc_label" android:id="@+id/cc_label"
android:layout_below="@+id/to" android:layout_alignRight="@+id/to_label" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/to_label"
android:layout_alignLeft="@+id/to_label" android:layout_alignLeft="@+id/to_label"
android:gravity="right" android:paddingRight="4dp" android:paddingTop="4dp" android:layout_alignBaseline="@+id/cc"
android:paddingRight="4dp"
android:paddingTop="4dp"
android:text="@string/message_view_cc_label"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
android:textStyle="bold" android:textStyle="bold"
android:textAppearance="@android:style/TextAppearance.Medium" android:textAppearance="@android:style/TextAppearance.Medium" /> -->
/>
<TextView <TextView
android:id="@+id/cc" 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_toRightOf="@+id/cc_label"
android:layout_below="@+id/to"
android:maxLines="2" android:maxLines="2"
android:ellipsize="end" android:ellipsize="end"
android:paddingRight="4dp"
android:gravity="right" android:paddingRight="4dp" android:paddingTop="4dp" android:paddingTop="4dp"
android:textColor="?android:attr/textColorSecondary" android:textColor="?android:attr/textColorSecondary"
android:textAppearance="@android:style/TextAppearance.Medium" android:textAppearance="@android:style/TextAppearance.Medium" />
android:layout_toRightOf="@+id/cc_label"
android:layout_alignBaseline="@+id/cc_label" android:layout_alignTop="@+id/cc_label"/>
<!-- Date -->
<!-- Date -->
<TextView <TextView
android:id="@+id/date" android:id="@+id/date"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="left" android:layout_below="@id/cc"
android:layout_below="@+id/cc_label" android:layout_alignParentRight="true"
android:layout_alignParentLeft="false" android:paddingTop="8dp"
android:singleLine="true" android:singleLine="true"
android:ellipsize="none" android:ellipsize="none"
android:textAppearance="?android:attr/textAppearanceSmall" android:paddingTop="20dp" android:textAppearance="?android:attr/textAppearanceSmall"
android:gravity="bottom" android:textColor="?android:attr/textColorSecondary" android:textColor="?android:attr/textColorSecondary" />
android:layout_alignParentBottom="false" android:layout_alignParentRight="true"
android:layout_alignWithParentIfMissing="false"/>
<CheckBox <CheckBox
android:id="@+id/flagged" android:id="@+id/flagged"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignTop="@id/from"
android:focusable="false" android:focusable="false"
android:button="@drawable/star" android:button="@drawable/star"
android:gravity="right|top" android:checked="false" />
android:checked="false"
android:layout_alignParentRight="true" android:layout_alignTop="@+id/from"/>
</RelativeLayout> </RelativeLayout>
</LinearLayout> </LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_marginRight="6dip"
android:orientation="vertical">
<TextView <TextView
android:id="@+id/additional_headers_view" android:id="@+id/additional_headers_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_margin="10dp"
android:layout_marginRight="6dip"
android:singleLine="false" android:singleLine="false"
android:ellipsize="none" android:ellipsize="none"
android:textColor="?android:attr/textColorSecondary" android:textColor="?android:attr/textColorSecondary"
android:textAppearance="?android:attr/textAppearanceSmall" android:layout_margin="10dp" android:textAppearance="?android:attr/textAppearanceSmall"
android:textIsSelectable="true"/> android:textIsSelectable="true" />
</LinearLayout>
<View <View
android:layout_height="1dip" android:layout_height="1dip"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -240,7 +242,6 @@
<include layout="@layout/message_view_crypto_layout"/> <include layout="@layout/message_view_crypto_layout"/>
</LinearLayout> </LinearLayout>
</com.fsck.k9.view.MessageHeader> </com.fsck.k9.view.MessageHeader>