1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-11 20:15:03 -05:00
k-9/res/layout/message_view_header.xml

308 lines
13 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<com.fsck.k9.view.MessageHeader
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/header_container"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- Message header area -->
<TableLayout
android:id="@+id/top_container"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:stretchColumns="1"
android:shrinkColumns="1"
android:background="@drawable/message_view_header_background">
<TableRow>
<!-- Color chip -->
<View
android:id="@+id/chip"
android:layout_marginRight="6dip"
android:layout_width="6dip"
android:layout_height="fill_parent"/>
<LinearLayout
android:paddingTop="2dip"
android:paddingBottom="3dip"
android:layout_column="1"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- Subject -->
<TextView
android:id="@+id/subject"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="3"
android:ellipsize="end"
android:textSize="10sp"
android:textStyle="bold"
android:textColor="?android:attr/textColorSecondary"
android:textAppearance="?android:attr/textAppearanceSmall"/>
<!-- From -->
<LinearLayout
android:id="@+id/from_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/from"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="6dip"
android:singleLine="true"
android:ellipsize="end"
android:textColor="?android:attr/textColorPrimary"
android:textAppearance="?android:attr/textAppearanceSmall"/>
</LinearLayout>
<!-- To -->
<LinearLayout
android:id="@+id/to_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:baselineAligned="true">
<TextView
android:id="@+id/to_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="4dip"
android:text="@string/message_to_label"
android:textSize="10sp"
android:textStyle="bold"
android:textColor="?android:attr/textColorSecondary"/>
<TextView
android:id="@+id/to"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="2"
android:ellipsize="end"
android:textSize="10sp"
android:textColor="?android:attr/textColorSecondary"
android:textAppearance="?android:attr/textAppearanceSmall"/>
</LinearLayout>
<!-- CC -->
<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"
android:text="@string/message_view_cc_label"
android:textSize="10sp"
android:textStyle="bold"
android:textColor="?android:attr/textColorSecondary"/>
<TextView
android:id="@+id/cc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="2"
android:ellipsize="end"
android:textSize="10sp"
android:textColor="?android:attr/textColorSecondary"
android:textAppearance="?android:attr/textAppearanceSmall"/>
</LinearLayout>
<TextView
android:id="@+id/additional_headers_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="false"
android:ellipsize="none"
android:textSize="10sp"
android:textColor="?android:attr/textColorSecondary"
android:textAppearance="?android:attr/textAppearanceSmall"/>
</LinearLayout>
<!-- Dummy column that is used to ensure the height of the table row is large
enough to fit the date/time column -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- Fixed spacing -->
<View
android:layout_width="0dp"
android:layout_height="18dp"/>
<!-- We don't want to hardcode the height of the star. The minHeight
is that of 'answered'. -->
<CheckBox
android:layout_width="0dp"
android:layout_height="wrap_content"
android:minHeight="22sp"
android:focusable="false"
style="?android:attr/starStyle"/>
<!-- Two text views that will be set to the same height as their
counterparts in the next colum -->
<TextView
android:id="@+id/dummy_date"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:singleLine="true"/>
<TextView
android:id="@+id/dummy_time"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textSize="10sp"
android:singleLine="true"/>
</LinearLayout>
<!-- Date/Time + Icons
The height of this column is 'fill_parent' so we can put the show more/less
indicator at the bottom. Unfortunately using 'fill_parent' also means that
the views in this column will be cut of if their combined height exceeds
that of the highest non-'fill_parent' column. That's why we need the dummy
column above. -->
<LinearLayout
android:id="@+id/topright_container"
android:layout_marginTop="2dip"
android:layout_marginRight="6dip"
android:orientation="vertical"
android:layout_height="fill_parent"
android:layout_marginLeft="6dp"
android:gravity="right">
<LinearLayout
android:id="@+id/icons_container"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical">
<View
android:id="@+id/answered"
android:layout_width="22sp"
android:layout_height="22sp"
android:paddingRight="4dip"
android:background="@drawable/ic_email_answered_small"/>
<CheckBox
android:id="@+id/flagged"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
style="?android:attr/starStyle"/>
</LinearLayout>
<TextView
android:id="@+id/date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="none"
android:textSize="10sp"
android:textColor="?android:attr/textColorPrimary"
android:textAppearance="?android:attr/textAppearanceSmall"/>
<TextView
android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="10sp"
android:singleLine="true"
android:ellipsize="none"
android:textColor="?android:attr/textColorPrimary"
android:textAppearance="?android:attr/textAppearanceSmall"/>
<!-- View that will take up all available space between the time and
the show more/less indicator -->
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1"/>
<ImageView
android:id="@+id/show_additional_headers_icon"
android:src="@drawable/show_more"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="6dp"
android:layout_marginBottom="3dip"/>
</LinearLayout>
</TableRow>
</TableLayout>
<View
android:id="@+id/separator"
android:layout_width="fill_parent"
android:layout_height="1.5dp"
android:background="#59000000"/>
<!-- Button area -->
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:paddingLeft="6dip"
android:paddingRight="6dip"
android:paddingTop="4dip"
android:baselineAligned="false">
<Button
android:id="@+id/show_pictures"
android:layout_width="wrap_content"
android:visibility="gone"
android:layout_marginLeft="6dip"
android:layout_marginBottom="4dip"
android:layout_height="wrap_content"
android:text="@string/message_view_show_pictures_action"
style="?android:attr/buttonStyleSmall"/>
<Button
android:id="@+id/show_attachments"
android:visibility="gone"
android:layout_marginLeft="6dip"
android:layout_marginBottom="4dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/message_view_show_attachments_action"
style="?android:attr/buttonStyleSmall"/>
<Button
android:id="@+id/show_message"
android:visibility="gone"
android:layout_marginLeft="6dip"
android:layout_marginBottom="4dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/message_view_show_message_action"
style="?android:attr/buttonStyleSmall"/>
</LinearLayout>
<include layout="@layout/message_view_crypto_layout"/>
</LinearLayout>
</com.fsck.k9.view.MessageHeader>