Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!--
      3      Copyright (C) 2012 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 <FrameLayout
     20     xmlns:android="http://schemas.android.com/apk/res/android"
     21     android:id="@+id/widget_conversation_list_item"
     22     android:layout_width="match_parent"
     23     android:layout_height="72sp">
     24     <!--
     25         Remote view doesn't allow changing background so we have to work around
     26         by having 2 image views here.
     27     -->
     28     <ImageView
     29         android:id="@+id/widget_unread_background"
     30         android:layout_width="match_parent"
     31         android:layout_height="match_parent"
     32         android:background="@drawable/conversation_item_background" />
     33     <ImageView
     34         android:id="@+id/widget_read_background"
     35         android:layout_width="match_parent"
     36         android:layout_height="match_parent"
     37         android:background="@drawable/conversation_item_background" />
     38     <LinearLayout
     39         android:id="@+id/content"
     40         android:layout_width="match_parent"
     41         android:layout_height="match_parent"
     42         android:orientation="vertical" >
     43         <LinearLayout
     44             android:layout_width="match_parent"
     45             android:layout_height="wrap_content"
     46             android:layout_marginTop="10sp"
     47             android:layout_marginLeft="16dp"
     48             android:layout_marginRight="16dp"
     49             android:gravity="top"
     50             android:orientation="horizontal" >
     51             <TextView
     52                 android:id="@+id/widget_senders"
     53                 android:layout_width="0dp"
     54                 android:layout_height="wrap_content"
     55                 android:layout_weight="1"
     56                 android:singleLine="true"
     57                 android:ellipsize="end"
     58                 android:textSize="@dimen/senders_font_size"
     59                 android:includeFontPadding="false"
     60                 style="@style/WidgetSendersStyle" />
     61             <ImageView
     62                 android:id="@+id/widget_attachment"
     63                 android:layout_width="wrap_content"
     64                 android:layout_height="wrap_content"
     65                 android:layout_marginTop="4sp"
     66                 style="@style/WidgetAttachStyle"/>
     67             <TextView
     68                 android:id="@+id/widget_date"
     69                 android:layout_width="wrap_content"
     70                 android:layout_height="match_parent"
     71                 android:gravity="top" />
     72         </LinearLayout>
     73 
     74         <TextView
     75             android:id="@+id/widget_subject"
     76             android:layout_width="match_parent"
     77             android:layout_height="wrap_content"
     78             android:layout_marginLeft="16dp"
     79             android:layout_marginRight="16dp"
     80             android:maxLines="1"
     81             android:includeFontPadding="false"
     82             android:textAlignment="viewStart"/>
     83 
     84         <TextView
     85             android:id="@+id/widget_snippet"
     86             android:layout_width="match_parent"
     87             android:layout_height="wrap_content"
     88             android:layout_marginLeft="16dp"
     89             android:layout_marginRight="16dp"
     90             android:includeFontPadding="false"
     91             android:textAlignment="viewStart"
     92             android:maxLines="1"/>
     93 
     94         <LinearLayout
     95             android:id="@+id/labels"
     96             android:layout_width="wrap_content"
     97             android:layout_height="0dp"
     98             android:layout_weight="1"
     99             android:layout_gravity="right|end"
    100             android:gravity="bottom" >
    101             <ImageView
    102                     android:id="@+id/widget_folder_0"
    103                     android:layout_width="32dp"
    104                     android:layout_height="6sp"
    105                     android:scaleType="fitXY" />
    106             <ImageView
    107                     android:id="@+id/widget_folder_1"
    108                     android:layout_width="32dp"
    109                     android:layout_height="6sp"
    110                     android:scaleType="fitXY" />
    111             <ImageView
    112                     android:id="@+id/widget_folder_2"
    113                     android:layout_width="32dp"
    114                     android:layout_height="6sp"
    115                     android:scaleType="fitXY" />
    116         </LinearLayout>
    117     </LinearLayout>
    118 </FrameLayout>
    119