Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!--
      3      Copyright (C) 2011 Google Inc.
      4      Licensed to The Android Open Source Project.
      5 
      6      Licensed under the Apache License, Version 2.0 (the "License");
      7      you may not use this file except in compliance with the License.
      8      You may obtain a copy of the License at
      9 
     10           http://www.apache.org/licenses/LICENSE-2.0
     11 
     12      Unless required by applicable law or agreed to in writing, software
     13      distributed under the License is distributed on an "AS IS" BASIS,
     14      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     15      See the License for the specific language governing permissions and
     16      limitations under the License.
     17 -->
     18 
     19 <!-- NOTE: Be careful when setting title_container's marginEnd.
     20      The value is updated in code. See uses of
     21      MessageHeaderView.mCollapsedTitleContainerMarginEnd -->
     22 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     23     android:id="@+id/title_container"
     24     android:layout_width="0dip"
     25     android:layout_height="wrap_content"
     26     android:layout_weight="1"
     27     android:layout_marginTop="@dimen/message_header_text_margin_top"
     28     style="@style/MessageUpperHeaderTextStyle" >
     29 
     30     <TextView
     31         android:id="@+id/upper_date"
     32         android:layout_width="wrap_content"
     33         android:layout_height="wrap_content"
     34         android:layout_alignBaseline="@+id/sender_name"
     35         android:visibility="gone"
     36         android:lines="1"
     37         style="@style/MessageHeaderUpperDateStyle" />
     38 
     39     <ImageView
     40         android:id="@+id/attachment"
     41         android:layout_width="wrap_content"
     42         android:layout_height="wrap_content"
     43         android:layout_marginTop="6dp"
     44         android:layout_toStartOf="@id/upper_date"
     45         android:layout_toLeftOf="@id/upper_date"
     46         android:src="@drawable/ic_attach_file_18dp"
     47         style="@style/AttachmentIconStyle" />
     48 
     49     <TextView
     50         android:id="@id/sender_name"
     51         android:layout_width="wrap_content"
     52         android:layout_height="wrap_content"
     53         android:layout_toStartOf="@id/attachment"
     54         android:layout_toLeftOf="@id/attachment"
     55         style="@style/MessageSenderNameStyle" />
     56 
     57     <TextView
     58         android:id="@+id/recipient_summary"
     59         android:layout_width="wrap_content"
     60         android:layout_height="wrap_content"
     61         android:layout_below="@id/sender_name"
     62         android:ellipsize="end"
     63         style="@style/MessageHeaderSubtitleStyle" />
     64 
     65     <TextView
     66         android:id="@+id/send_date"
     67         android:layout_width="wrap_content"
     68         android:layout_height="wrap_content"
     69         android:layout_below="@id/recipient_summary"
     70         android:background="?android:attr/selectableItemBackground"
     71         android:paddingBottom="@dimen/message_header_margin_bottom"
     72         style="@style/MessageHeaderSubtitleStyle" />
     73 
     74     <TextView
     75         android:id="@+id/hide_details"
     76         android:layout_width="wrap_content"
     77         android:layout_height="wrap_content"
     78         android:layout_below="@id/recipient_summary"
     79         android:background="?android:attr/selectableItemBackground"
     80         android:paddingBottom="@dimen/message_header_margin_bottom"
     81         android:text="@string/hide_details"
     82         android:textColor="@color/conversation_view_text_color_link_blue"
     83         android:visibility="gone"
     84         style="@style/MessageHeaderSubtitleStyle" />
     85 
     86     <TextView
     87         android:id="@+id/email_snippet"
     88         android:layout_width="wrap_content"
     89         android:layout_height="wrap_content"
     90         android:layout_marginBottom="16dp"
     91         android:layout_below="@id/sender_name"
     92         style="@style/MessageHeaderSnippetStyle" />
     93 
     94 </RelativeLayout>
     95