• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2014 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<!-- Layout for an action item displayed in the 2 pane dialog. -->
17<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
18    xmlns:tools="http://schemas.android.com/tools"
19    android:layout_width="match_parent"
20    android:layout_height="wrap_content"
21    android:focusable="true"
22    android:minHeight="@dimen/list_item_min_height"
23    android:paddingBottom="@dimen/list_item_vertical_padding"
24    android:paddingTop="@dimen/list_item_vertical_padding" >
25
26    <ImageView
27        android:id="@+id/action_checkmark"
28        style="@style/Canvas.Image.Dialog.List.Checkmark"
29        android:layout_width="@dimen/list_item_checkmark_diameter"
30        android:layout_height="@dimen/list_item_checkmark_diameter"
31        android:layout_alignParentStart="true"
32        android:layout_centerVertical="true"
33        android:layout_marginStart="@dimen/list_item_start_padding"
34        android:layout_marginEnd="@dimen/list_item_delimiter_padding"
35        tools:ignore="ContentDescription" />
36
37    <ImageView
38        android:id="@+id/action_icon"
39        style="@style/Canvas.Image.Dialog.List.Icon"
40        android:layout_width="@dimen/list_item_icon_width"
41        android:layout_height="@dimen/list_item_icon_height"
42        android:layout_centerVertical="true"
43        android:layout_marginEnd="@dimen/list_item_delimiter_padding"
44        android:layout_toEndOf="@id/action_checkmark"
45        android:scaleType="fitCenter"
46        tools:ignore="ContentDescription" />
47
48    <!-- TODO: Investigate replacing this with a chevron 9-patch and a single ImageView -->
49
50    <FrameLayout
51        android:id="@+id/action_next_chevron_background"
52        android:layout_width="wrap_content"
53        android:layout_height="match_parent"
54        android:layout_alignParentEnd="true"
55        android:layout_centerVertical="true"
56        android:layout_marginStart="@dimen/list_item_delimiter_padding"
57        android:paddingEnd="@dimen/list_item_end_padding" >
58
59        <ImageView
60            android:id="@+id/action_next_chevron"
61            style="@style/Canvas.Image.Dialog.List.Icon"
62            android:layout_width="wrap_content"
63            android:layout_height="wrap_content"
64            android:layout_gravity="start|center_vertical"
65            android:scaleType="fitCenter"
66            android:src="@drawable/ic_chevron_end"
67            tools:ignore="ContentDescription" />
68    </FrameLayout>
69
70    <LinearLayout
71        android:id="@+id/action_content"
72        android:layout_width="match_parent"
73        android:layout_height="wrap_content"
74        android:layout_centerVertical="true"
75        android:layout_toStartOf="@id/action_next_chevron_background"
76        android:layout_toEndOf="@id/action_icon"
77        android:orientation="vertical" >
78
79        <TextView
80            android:id="@+id/action_title"
81            style="@style/Canvas.Text.Dialog.List.Title"
82            android:layout_width="wrap_content"
83            android:layout_height="wrap_content"
84            android:maxLines="@integer/action_title_min_lines"
85            android:ellipsize="end" />
86
87        <TextView
88            android:id="@+id/action_description"
89            style="@style/Canvas.Text.Dialog.List.Description"
90            android:layout_width="wrap_content"
91            android:layout_height="wrap_content"
92            android:maxLines="@integer/action_description_min_lines"
93            android:ellipsize="end" />
94    </LinearLayout>
95
96</RelativeLayout>
97