• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2011 The Android Open Source Project
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8          http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15-->
16
17
18<!-- This layout is used as a template to create custom message list item view
19    in wide mode. To be able to get the correct measurements, every source field should
20    be populated with data here. E.g:
21    - Text View should set text to a random long string (android:text="@string/long_string")
22    - Image View should set source to a specific asset -->
23<LinearLayout
24    xmlns:android="http://schemas.android.com/apk/res/android"
25    style="@style/message_list_item_wide"
26    android:layout_width="match_parent"
27    android:layout_height="match_parent"
28    android:orientation="horizontal">
29    <ImageView
30        android:id="@+id/checkmark"
31        android:layout_width="wrap_content"
32        android:layout_height="wrap_content"
33        android:layout_marginLeft="@dimen/checkmark_left_margin_wide"
34        android:layout_marginRight="16dip"
35        android:layout_gravity="center_vertical"
36        android:src="@drawable/btn_check_on_normal_holo_light" />
37    <TextView
38        android:id="@+id/senders"
39        android:layout_width="0dip"
40        android:layout_height="wrap_content"
41        android:layout_weight="0.3"
42        android:layout_gravity="center_vertical"
43        android:text="@string/long_string"
44        android:textSize="@dimen/wide_senders_font_size"
45        android:lines="1" />
46    <ImageView
47        android:id="@+id/reply_state"
48        android:layout_width="wrap_content"
49        android:layout_height="wrap_content"
50        android:layout_marginLeft="16dip"
51        android:layout_marginRight="16dip"
52        android:layout_gravity="center_vertical"
53        android:src="@drawable/ic_badge_reply_holo_light" />
54    <TextView
55        android:id="@+id/subject"
56        android:layout_width="0dip"
57        android:layout_height="wrap_content"
58        android:layout_weight="0.7"
59        android:layout_marginLeft="16dip"
60        android:layout_marginRight="16dip"
61        android:layout_gravity="center_vertical"
62        android:text="@string/long_string"
63        android:textSize="@dimen/wide_subject_font_size"
64        android:lines="2" />
65    <RelativeLayout
66        android:layout_width="@dimen/date_region_width_wide"
67        android:layout_height="match_parent">
68        <View
69            android:id="@+id/color_chip"
70            android:layout_width="@dimen/message_list_item_color_tip_width"
71            android:layout_height="@dimen/message_list_item_color_tip_height"
72            android:layout_alignParentTop="true"
73            android:layout_alignParentRight="true"
74            android:paddingTop="2dip" />
75
76        <ImageView
77            android:id="@+id/paperclip"
78            android:layout_width="36dip"
79            android:layout_height="16dip"
80            android:layout_centerVertical="true"
81            android:layout_marginRight="4dip"
82            android:src="@drawable/ic_attachment_holo_light" />
83
84        <TextView
85            android:id="@+id/date"
86            android:layout_width="wrap_content"
87            android:layout_height="wrap_content"
88            android:layout_centerVertical="true"
89            android:layout_alignParentRight="true"
90            android:text="@string/long_string"
91            android:lines="1" />
92
93    </RelativeLayout>
94    <ImageView
95        android:id="@+id/star"
96        android:layout_width="wrap_content"
97        android:layout_height="wrap_content"
98        android:layout_marginLeft="16dip"
99        android:layout_marginRight="@dimen/star_right_margin_wide"
100        android:layout_gravity="center_vertical"
101        android:src="@drawable/btn_star_off_normal_email_holo_light" />
102</LinearLayout>
103