mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-24 08:38:51 -05:00
relayout the message header area
This commit is contained in:
parent
82a8ac6278
commit
14b4b28fa0
@ -1,224 +1,247 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<com.fsck.k9.view.MessageHeader
|
<com.fsck.k9.view.MessageHeader
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/header_container"
|
android:id="@+id/header_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:background="@color/message_view_header_background"
|
||||||
android:orientation="vertical">
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/subject"
|
||||||
|
android:layout_width="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:ellipsize="end"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
|
android:text="@string/general_no_subject" android:padding="8dp"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/message_view_header_background">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<!-- Color chip -->
|
<!-- Color chip -->
|
||||||
<View
|
<View
|
||||||
android:id="@+id/chip"
|
android:id="@+id/chip"
|
||||||
android:layout_width="6dip"
|
android:layout_width="6dip"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginRight="6dip"/>
|
android:layout_marginRight="6dip"/>
|
||||||
|
|
||||||
<LinearLayout
|
<RelativeLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_height="fill_parent" android:layout_gravity="center">
|
||||||
|
<QuickContactBadge
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:id="@+id/contact_badge" android:layout_gravity="center|top"
|
||||||
|
android:layout_marginTop="8dp" android:layout_centerHorizontal="true"
|
||||||
|
android:layout_marginLeft="8dp"/>
|
||||||
|
<!-- State icons -->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/icon_container"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dip"
|
||||||
|
android:layout_marginBottom="2dip"
|
||||||
|
android:layout_gravity="center_vertical|right"
|
||||||
|
android:orientation="vertical" android:layout_centerHorizontal="true"
|
||||||
|
android:layout_below="@+id/contact_badge">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/answered"
|
||||||
|
android:layout_width="32sp"
|
||||||
|
android:layout_height="32sp"
|
||||||
|
android:paddingRight="2dip"
|
||||||
|
android:background="@drawable/ic_email_answered_small"/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/forwarded"
|
||||||
|
android:layout_width="22sp"
|
||||||
|
android:layout_height="22sp"
|
||||||
|
android:paddingRight="4dip"
|
||||||
|
android:background="@drawable/ic_email_forwarded_small"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" android:padding="6dip" android:layout_marginLeft="4dp">
|
||||||
|
|
||||||
|
<!-- From -->
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/from"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:paddingRight="6dip"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
|
android:paddingTop="0dp" android:textStyle="bold" android:text="@string/general_no_sender"/>
|
||||||
|
|
||||||
|
<!-- To -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
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:layout_alignRight="@+id/date_label"
|
||||||
|
android:textAppearance="@android:style/TextAppearance.Medium"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/to"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:maxLines="2"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
|
android:textAppearance="@android:style/TextAppearance.Medium"
|
||||||
|
|
||||||
|
android:paddingBottom="4dp"
|
||||||
|
android:layout_toRightOf="@+id/to_label" android:layout_alignBaseline="@+id/to_label"
|
||||||
|
android:layout_alignTop="@+id/to_label"/>
|
||||||
|
|
||||||
|
<!-- CC -->
|
||||||
|
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/message_view_cc_label"
|
||||||
|
android:id="@+id/cc_label"
|
||||||
|
android:layout_below="@+id/to" android:layout_alignRight="@+id/to_label"
|
||||||
|
android:layout_alignLeft="@+id/to_label"
|
||||||
|
android:gravity="right" android:paddingRight="4dp" android:paddingTop="4dp"
|
||||||
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textAppearance="@android:style/TextAppearance.Medium"
|
||||||
|
/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/cc"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:maxLines="2"
|
||||||
|
android:ellipsize="end"
|
||||||
|
|
||||||
|
android:gravity="right" android:paddingRight="4dp" android:paddingTop="4dp"
|
||||||
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
|
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 -->
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/date"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="left"
|
||||||
|
android:layout_below="@+id/cc_label"
|
||||||
|
android:layout_alignParentLeft="false"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="none"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall" android:paddingTop="20dp"
|
||||||
|
android:gravity="bottom" android:textColor="?android:attr/textColorSecondary"
|
||||||
|
android:layout_alignParentBottom="false" android:layout_alignParentRight="true"
|
||||||
|
android:layout_alignWithParentIfMissing="false"/>
|
||||||
|
<CheckBox
|
||||||
|
android:id="@+id/flagged"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:focusable="false"
|
||||||
|
android:button="@drawable/star"
|
||||||
|
android:gravity="right|top"
|
||||||
|
android:checked="false"
|
||||||
|
android:layout_alignParentRight="true" android:layout_alignTop="@+id/from"/>
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginRight="6dip"
|
android:layout_marginRight="6dip"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
|
<TextView
|
||||||
|
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:singleLine="false"
|
||||||
|
android:ellipsize="none"
|
||||||
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall" android:layout_margin="10dp"
|
||||||
|
android:textIsSelectable="true"/>
|
||||||
|
|
||||||
<!-- Subject -->
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/subject"
|
|
||||||
android:layout_width="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:ellipsize="end"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"/>
|
|
||||||
|
|
||||||
<!-- From -->
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/from"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@id/subject"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:layout_toLeftOf="@+id/state_container"
|
|
||||||
android:paddingRight="6dip"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"/>
|
|
||||||
|
|
||||||
<!-- To -->
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/to"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@id/from"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:layout_toLeftOf="@+id/state_container"
|
|
||||||
android:maxLines="2"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"/>
|
|
||||||
|
|
||||||
<!-- CC -->
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/cc"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@id/to"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:maxLines="2"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/state_container"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentTop="true"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<!-- Date -->
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/date"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="right"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:ellipsize="none"
|
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"/>
|
|
||||||
|
|
||||||
<!-- Time -->
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/time"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="right"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:ellipsize="none"
|
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"/>
|
|
||||||
|
|
||||||
<!-- State icons -->
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/icon_container"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="2dip"
|
|
||||||
android:layout_marginBottom="2dip"
|
|
||||||
android:layout_gravity="center_vertical|right"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:id="@+id/answered"
|
|
||||||
android:layout_width="22sp"
|
|
||||||
android:layout_height="22sp"
|
|
||||||
android:paddingRight="4dip"
|
|
||||||
android:background="@drawable/ic_email_answered_small"/>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:id="@+id/forwarded"
|
|
||||||
android:layout_width="22sp"
|
|
||||||
android:layout_height="22sp"
|
|
||||||
android:paddingRight="4dip"
|
|
||||||
android:background="@drawable/ic_email_forwarded_small"/>
|
|
||||||
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/flagged"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:focusable="false"
|
|
||||||
android:button="@drawable/star"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/additional_headers_view"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginRight="10dp"
|
|
||||||
android:singleLine="false"
|
|
||||||
android:ellipsize="none"
|
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_height="1dip"
|
android:layout_height="1dip"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:layout_below="@id/additional_headers_view"
|
android:layout_below="@id/additional_headers_view"
|
||||||
android:background="@drawable/divider_horizontal_email" />
|
android:background="@drawable/divider_horizontal_email"/>
|
||||||
|
|
||||||
<!-- Button area -->
|
<!-- Button area -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="right"
|
android:gravity="right"
|
||||||
android:paddingLeft="6dip"
|
android:paddingLeft="6dip"
|
||||||
android:paddingRight="6dip"
|
android:paddingRight="6dip"
|
||||||
android:paddingTop="4dip"
|
android:paddingTop="4dip"
|
||||||
android:baselineAligned="false">
|
android:baselineAligned="false">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/show_pictures"
|
android:id="@+id/show_pictures"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:layout_marginLeft="6dip"
|
android:layout_marginLeft="6dip"
|
||||||
android:layout_marginBottom="4dip"
|
android:layout_marginBottom="4dip"
|
||||||
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"
|
||||||
style="?android:attr/buttonStyleSmall"/>
|
style="?android:attr/buttonStyleSmall"/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/show_attachments"
|
android:id="@+id/show_attachments"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:layout_marginLeft="6dip"
|
android:layout_marginLeft="6dip"
|
||||||
android:layout_marginBottom="4dip"
|
android:layout_marginBottom="4dip"
|
||||||
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_attachments_action"
|
android:text="@string/message_view_show_attachments_action"
|
||||||
style="?android:attr/buttonStyleSmall"/>
|
style="?android:attr/buttonStyleSmall"/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/show_message"
|
android:id="@+id/show_message"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:layout_marginLeft="6dip"
|
android:layout_marginLeft="6dip"
|
||||||
android:layout_marginBottom="4dip"
|
android:layout_marginBottom="4dip"
|
||||||
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_message_action"
|
android:text="@string/message_view_show_message_action"
|
||||||
style="?android:attr/buttonStyleSmall"/>
|
style="?android:attr/buttonStyleSmall"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<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>
|
||||||
|
Loading…
Reference in New Issue
Block a user