Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!--
      3 /*
      4  * Copyright (C) 2012 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 
     20 <FrameLayout
     21     xmlns:android="http://schemas.android.com/apk/res/android"
     22     android:id="@+id/widget_conversation"
     23     android:layout_width="match_parent"
     24     android:layout_height="48dp">
     25     <!--
     26         Remote view doesn't allow changing background so we have to work around
     27         by having 2 image views here.
     28     -->
     29     <ImageView
     30         android:id="@+id/widget_unread_background"
     31         android:layout_width="match_parent"
     32         android:layout_height="match_parent"
     33         android:background="@drawable/widget_conversation_unread_selector" />
     34     <ImageView
     35         android:id="@+id/widget_read_background"
     36         android:layout_width="match_parent"
     37         android:layout_height="match_parent"
     38         android:background="@drawable/widget_conversation_read_selector" />
     39     <RelativeLayout
     40         android:layout_width="match_parent"
     41         android:layout_height="match_parent"
     42         android:paddingLeft="8dip" >
     43 
     44         <TextView android:id="@+id/from"
     45             android:layout_width="wrap_content"
     46             android:layout_height="wrap_content"
     47             android:textAppearance="?android:attr/textAppearanceMediumInverse"
     48             android:singleLine="true"
     49             android:textSize="16sp"
     50             android:layout_marginTop="6dip"
     51             android:layout_marginRight="5dip"
     52             android:layout_alignParentTop="true"
     53             android:layout_alignParentLeft="true"
     54             android:ellipsize="marquee"  />
     55 
     56         <TextView android:id="@+id/date"
     57             android:layout_marginTop="2dip"
     58             android:layout_marginBottom="5dip"
     59             android:layout_marginLeft="5dip"
     60             android:layout_marginRight="8dip"
     61             android:textSize="12sp"
     62             android:layout_height="wrap_content"
     63             android:layout_width="wrap_content"
     64             android:textAppearance="?android:attr/textAppearanceSmallInverse"
     65             android:singleLine="true"
     66             android:layout_alignParentRight="true"
     67             android:layout_alignParentBottom="true" />
     68 
     69         <ImageView android:id="@+id/error"
     70             android:layout_marginLeft="3dip"
     71             android:visibility="gone"
     72             android:layout_toLeftOf="@id/date"
     73             android:layout_alignBottom="@id/date"
     74             android:layout_height="wrap_content"
     75             android:layout_width="wrap_content"
     76             android:src="@drawable/ic_list_alert_sms_failed" />
     77 
     78         <ImageView android:id="@+id/attachment"
     79             android:layout_marginLeft="3dip"
     80             android:layout_height="wrap_content"
     81             android:layout_width="wrap_content"
     82             android:visibility="gone"
     83             android:layout_toLeftOf="@id/error"
     84             android:layout_alignBottom="@id/date"
     85             android:src="@drawable/ic_attachment_universal_small" />
     86 
     87         <TextView android:id="@+id/subject"
     88             android:layout_width="wrap_content"
     89             android:layout_height="wrap_content"
     90             android:textAppearance="?android:attr/textAppearanceSmallInverse"
     91             android:singleLine="true"
     92             android:textSize="12sp"
     93             android:layout_marginBottom="5dip"
     94             android:layout_alignParentBottom="true"
     95             android:layout_alignParentLeft="true"
     96             android:layout_toLeftOf="@id/attachment"
     97             android:ellipsize="end" />
     98     </RelativeLayout>
     99 </FrameLayout>