Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!--
      3     Copyright (C) 2015 The Android Open Source Project
      4 
      5     Licensed under the Apache License, Version 2.0 (the "License");
      6     you may not use this file except in compliance with the License.
      7     You may obtain a copy of the License at
      8 
      9          http://www.apache.org/licenses/LICENSE-2.0
     10 
     11     Unless required by applicable law or agreed to in writing, software
     12     distributed under the License is distributed on an "AS IS" BASIS,
     13     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14     See the License for the specific language governing permissions and
     15     limitations under the License.
     16 -->
     17 
     18 <RelativeLayout
     19     xmlns:android="http://schemas.android.com/apk/res/android"
     20     android:id="@+id/widget_conversation_list_item"
     21     android:layout_width="match_parent"
     22     style="@style/WidgetConversationListItemStyle"
     23     android:paddingLeft="8dip"
     24     android:paddingRight="8dip" >
     25 
     26     <FrameLayout
     27         android:id="@+id/avatarFrame"
     28         android:layout_centerVertical="true"
     29         android:layout_width="wrap_content"
     30         android:layout_height="wrap_content">
     31         <ImageView
     32             android:id="@+id/avatarView"
     33             style="@style/WidgetConversationListItemAvatar"
     34             android:layout_width="@dimen/contact_icon_view_normal_size"
     35             android:layout_height="@dimen/contact_icon_view_normal_size"
     36             android:layout_centerVertical="true"
     37             android:scaleType="fitXY"
     38             android:importantForAccessibility="no"
     39             android:contentDescription="@null" />
     40         <ImageView
     41             android:id="@+id/conversation_failed_status_icon"
     42             android:layout_width="wrap_content"
     43             android:layout_height="wrap_content"
     44             style="@style/WidgetConversationItemFailed"
     45             android:src="@drawable/ic_failed_status_red"
     46             android:visibility="gone"
     47             android:importantForAccessibility="no"
     48             android:contentDescription="@null"/>
     49     </FrameLayout>
     50 
     51     <LinearLayout
     52         android:layout_centerVertical="true"
     53         android:orientation="vertical"
     54         style="@style/WidgetConversationListItemBody"
     55         android:layout_width="match_parent"
     56         android:layout_height="wrap_content" >
     57 
     58         <RelativeLayout
     59             android:layout_width="match_parent"
     60             android:layout_height="wrap_content" >
     61 
     62             <LinearLayout
     63                 android:orientation="horizontal"
     64                 android:layout_width="match_parent"
     65                 android:layout_height="wrap_content"
     66                 android:layout_marginTop="6dip"
     67                 android:layout_alignParentTop="true"
     68                 android:gravity="center_vertical"
     69                 android:background="@android:color/transparent">
     70                 <ImageView
     71                     android:id="@+id/conversation_notification_bell"
     72                     style="@style/ConversationListNotificationBellPaddingStyle"
     73                     android:layout_width="wrap_content"
     74                     android:layout_height="wrap_content"
     75                     android:src="@drawable/ic_notifications_off_small_light"
     76                     android:visibility="gone"
     77                     android:importantForAccessibility="no"
     78                     android:contentDescription="@null"
     79                     android:layout_gravity="center_vertical"
     80                     android:background="@android:color/transparent" />
     81 
     82                 <TextView android:id="@+id/from"
     83                     style="@style/WidgetConversationListItemFrom"
     84                     android:layout_width="0dp"
     85                     android:layout_height="wrap_content"
     86                     android:layout_weight="1"
     87                     android:textAppearance="?android:attr/textAppearanceMediumInverse"
     88                     android:singleLine="true"
     89                     android:textSize="18sp"
     90                     android:textColor="@color/widget_text_color"
     91                     android:ellipsize="marquee"  />
     92 
     93                 <TextView android:id="@+id/date"
     94                     style="@style/WidgetConversationListItemDate"
     95                     android:paddingTop="4dp"
     96                     android:textSize="12sp"
     97                     android:layout_height="wrap_content"
     98                     android:layout_width="wrap_content"
     99                     android:textAppearance="?android:attr/textAppearanceSmallInverse"
    100                     android:singleLine="true"
    101                     android:textColor="@color/widget_text_color" />
    102             </LinearLayout>
    103         </RelativeLayout>
    104 
    105         <TextView android:id="@+id/snippet"
    106             android:layout_width="wrap_content"
    107             android:layout_height="wrap_content"
    108             android:textAppearance="?android:attr/textAppearanceSmallInverse"
    109             android:maxLines="2"
    110             android:textSize="13sp"
    111             android:layout_marginBottom="5dip"
    112             android:layout_alignParentBottom="true"
    113             android:textColor="@color/widget_text_color"
    114             android:ellipsize="end" />
    115 
    116         <LinearLayout android:id="@+id/errorBlock"
    117             android:orientation="vertical"
    118             android:layout_alignParentBottom="true"
    119             android:visibility="gone"
    120             android:layout_width="match_parent"
    121             android:layout_height="wrap_content" >
    122 
    123             <TextView android:id="@+id/errorSnippet"
    124                 android:layout_width="wrap_content"
    125                 android:layout_height="wrap_content"
    126                 android:textAppearance="?android:attr/textAppearanceSmallInverse"
    127                 android:maxLines="1"
    128                 android:textSize="13sp"
    129                 android:textColor="@color/widget_text_color"
    130                 android:ellipsize="end" />
    131 
    132             <TextView android:id="@+id/errorText"
    133                 android:layout_width="wrap_content"
    134                 android:layout_height="wrap_content"
    135                 android:textAppearance="?android:attr/textAppearanceSmallInverse"
    136                 android:maxLines="2"
    137                 android:textSize="13sp"
    138                 android:layout_marginBottom="5dip"
    139                 android:textColor="@color/conversation_list_error"
    140                 android:ellipsize="end" />
    141 
    142         </LinearLayout>
    143     </LinearLayout>
    144 </RelativeLayout>
    145