126 lines
5.2 KiB
XML
126 lines
5.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- Copyright (C) 2011 The Android Open Source Project
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
|
|
<!-- This layout is used as a template to create a custom message item view
|
|
in normal mode. To be able to get the correct measurements, every source field should
|
|
be populated with data here. E.g:
|
|
- Text View should set text to a random long string (android:text="@string/long_string")
|
|
- Image View should set source to a specific asset -->
|
|
<LinearLayout
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
style="@style/message_list_item_normal"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="@dimen/message_list_item_height_normal"
|
|
android:orientation="horizontal">
|
|
<RelativeLayout
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:paddingLeft="8dip"
|
|
android:paddingRight="8dip"
|
|
>
|
|
<ImageView
|
|
android:id="@+id/reply_state"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="@dimen/replystate_margin_top"
|
|
android:layout_marginLeft="@dimen/replystate_margin_left"
|
|
android:layout_alignParentTop="true"
|
|
android:src="@drawable/ic_badge_reply_holo_light"
|
|
/>
|
|
<ImageView
|
|
android:id="@+id/checkmark"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_centerHorizontal="true"
|
|
android:src="@drawable/btn_check_on_normal_holo_light"
|
|
android:layout_marginTop="@dimen/checkmark_margin_top"
|
|
android:layout_below="@id/reply_state"
|
|
/>
|
|
</RelativeLayout>
|
|
|
|
<!-- No top padding, since the color chips have no padding -
|
|
individual children should set their own top margins -->
|
|
<RelativeLayout
|
|
android:layout_width="0dip"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="1"
|
|
android:orientation="vertical"
|
|
android:paddingRight="16dip"
|
|
>
|
|
<View
|
|
android:id="@+id/color_chip"
|
|
android:layout_width="@dimen/message_list_item_color_tip_width"
|
|
android:layout_height="@dimen/message_list_item_color_tip_height"
|
|
android:layout_alignParentTop="true"
|
|
android:layout_alignParentRight="true"
|
|
/>
|
|
<ImageView
|
|
android:id="@+id/star"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignParentRight="true"
|
|
android:layout_marginTop="@dimen/star_margin_top"
|
|
android:src="@drawable/btn_star_off_normal_email_holo_light" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/date_container"
|
|
android:layout_width="80dip"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignParentRight="true"
|
|
android:layout_marginTop="@dimen/date_margin_top"
|
|
android:orientation="horizontal"
|
|
>
|
|
<!-- reserve enough vertical space for two icons -->
|
|
<ImageView
|
|
android:id="@+id/paperclip"
|
|
android:layout_width="36dip"
|
|
android:layout_height="16dip"
|
|
android:layout_gravity="top"
|
|
android:src="@drawable/ic_badge_attachment" />
|
|
<TextView
|
|
android:id="@+id/date"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textSize="@dimen/date_font_size"
|
|
android:text="@string/long_string"
|
|
android:lines="1" />
|
|
</LinearLayout>
|
|
|
|
<TextView
|
|
android:id="@+id/senders"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignParentTop="true"
|
|
android:layout_alignParentLeft="true"
|
|
android:layout_toLeftOf="@+id/date_container"
|
|
android:layout_marginTop="8dip"
|
|
android:text="@string/long_string"
|
|
android:textSize="@dimen/senders_font_size"
|
|
android:lines="1" />
|
|
<TextView
|
|
android:id="@+id/subject"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignParentLeft="true"
|
|
android:layout_alignParentBottom="true"
|
|
android:layout_toLeftOf="@+id/star"
|
|
android:layout_marginBottom="8dip"
|
|
android:text="@string/long_string"
|
|
android:textSize="@dimen/subject_font_size"
|
|
android:lines="2" />
|
|
</RelativeLayout>
|
|
</LinearLayout>
|