1<?xml version="1.0" encoding="utf-8"?>
2<!--
3/*
4* Copyright 2014, 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<com.android.intentresolver.widget.ResolverDrawerLayout
20    xmlns:android="http://schemas.android.com/apk/res/android"
21    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
22    xmlns:app="http://schemas.android.com/apk/res-auto"
23    android:layout_width="match_parent"
24    android:layout_height="match_parent"
25    android:maxWidth="@dimen/resolver_max_width"
26    app:maxCollapsedHeight="@dimen/resolver_max_collapsed_height_with_default"
27    android:id="@androidprv:id/contentPanel">
28
29    <LinearLayout
30        android:layout_width="match_parent"
31        android:layout_height="wrap_content"
32        app:layout_alwaysShow="true"
33        android:orientation="vertical"
34        android:background="@drawable/bottomsheet_background"
35        android:paddingTop="@dimen/resolver_small_margin"
36        android:elevation="@dimen/resolver_elevation">
37
38        <LinearLayout
39            android:layout_width="match_parent"
40            android:layout_height="wrap_content"
41            android:orientation="horizontal"
42            android:paddingBottom="@dimen/resolver_edge_margin"
43            android:paddingEnd="@dimen/resolver_edge_margin">
44            <ImageView
45                android:id="@android:id/icon"
46                android:layout_width="@dimen/resolver_icon_size"
47                android:layout_height="@dimen/resolver_icon_size"
48                android:layout_gravity="start|top"
49                android:layout_marginStart="@dimen/resolver_icon_margin"
50                android:src="@drawable/resolver_icon_placeholder"
51                android:scaleType="fitCenter" />
52
53            <TextView
54                android:id="@android:id/title"
55                android:layout_width="0dp"
56                android:layout_weight="1"
57                android:layout_height="wrap_content"
58                android:layout_marginStart="@dimen/resolver_icon_margin"
59                android:textColor="?android:attr/textColorPrimary"
60                android:fontFamily="@androidprv:string/config_headlineFontFamilyMedium"
61                android:textSize="16sp"
62                android:gravity="start|center_vertical"
63                android:paddingEnd="16dp" />
64
65            <LinearLayout
66                android:id="@androidprv:id/profile_button"
67                android:layout_width="wrap_content"
68                android:layout_height="48dp"
69                android:layout_marginTop="4dp"
70                android:layout_marginEnd="4dp"
71                android:paddingStart="8dp"
72                android:paddingEnd="8dp"
73                android:paddingTop="4dp"
74                android:paddingBottom="4dp"
75                android:focusable="true"
76                android:visibility="gone"
77                style="?android:attr/borderlessButtonStyle">
78
79                <ImageView
80                    android:id="@android:id/icon"
81                    android:layout_width="24dp"
82                    android:layout_height="24dp"
83                    android:layout_gravity="start|center_vertical"
84                    android:layout_marginEnd="?android:attr/listPreferredItemPaddingEnd"
85                    android:layout_marginTop="12dp"
86                    android:layout_marginBottom="12dp"
87                    android:scaleType="fitCenter" />
88
89                <TextView
90                    android:id="@android:id/text1"
91                    android:layout_width="wrap_content"
92                    android:layout_height="wrap_content"
93                    android:layout_gravity="start|center_vertical"
94                    android:layout_marginEnd="?android:attr/listPreferredItemPaddingEnd"
95                    android:textAppearance="?android:attr/textAppearanceButton"
96                    android:textColor="?android:attr/textColorPrimary"
97                    android:minLines="1"
98                    android:maxLines="1"
99                    android:ellipsize="marquee" />
100            </LinearLayout>
101        </LinearLayout>
102
103        <LinearLayout
104            android:id="@androidprv:id/button_bar"
105            android:visibility="gone"
106            style="?android:attr/buttonBarStyle"
107            android:layout_width="match_parent"
108            android:layout_height="wrap_content"
109            app:layout_alwaysShow="true"
110            android:gravity="end|center_vertical"
111            android:orientation="horizontal"
112            android:layoutDirection="locale"
113            android:measureWithLargestChild="true"
114            android:paddingTop="@dimen/resolver_button_bar_spacing"
115            android:paddingBottom="@dimen/resolver_button_bar_spacing"
116            android:paddingStart="@dimen/resolver_edge_margin"
117            android:paddingEnd="@dimen/resolver_small_margin"
118            android:elevation="@dimen/resolver_elevation">
119
120            <Button
121                android:id="@androidprv:id/button_once"
122                android:layout_width="wrap_content"
123                android:layout_gravity="start"
124                android:maxLines="2"
125                style="?android:attr/buttonBarButtonStyle"
126                android:fontFamily="@androidprv:string/config_headlineFontFamilyMedium"
127                android:layout_height="wrap_content"
128                android:enabled="false"
129                android:textAllCaps="false"
130                android:text="@string/activity_resolver_use_once"
131                android:onClick="onButtonClick" />
132
133            <Button
134                android:id="@androidprv:id/button_always"
135                android:layout_width="wrap_content"
136                android:layout_gravity="end"
137                android:maxLines="2"
138                style="?android:attr/buttonBarButtonStyle"
139                android:fontFamily="@androidprv:string/config_headlineFontFamilyMedium"
140                android:layout_height="wrap_content"
141                android:enabled="false"
142                android:textAllCaps="false"
143                android:text="@string/activity_resolver_use_always"
144                android:onClick="onButtonClick" />
145        </LinearLayout>
146    </LinearLayout>
147
148    <View
149        android:id="@androidprv:id/divider"
150        app:layout_alwaysShow="true"
151        android:layout_width="match_parent"
152        android:layout_height="1dp"
153        android:background="?android:attr/colorBackground"
154        android:foreground="?android:attr/dividerVertical" />
155
156    <FrameLayout
157        android:id="@androidprv:id/stub"
158        app:layout_alwaysShow="true"
159        android:visibility="gone"
160        android:layout_width="match_parent"
161        android:layout_height="wrap_content"
162        android:background="?android:attr/colorBackground"/>
163
164    <TabHost
165        app:layout_alwaysShow="true"
166        android:id="@androidprv:id/profile_tabhost"
167        android:layout_width="match_parent"
168        android:layout_height="wrap_content"
169        android:layout_alignParentTop="true"
170        android:layout_centerHorizontal="true"
171        android:background="?android:attr/colorBackground">
172        <LinearLayout
173            android:orientation="vertical"
174            android:layout_width="match_parent"
175            android:layout_height="wrap_content">
176            <TabWidget
177                android:id="@android:id/tabs"
178                android:layout_width="match_parent"
179                android:layout_height="wrap_content"
180                android:visibility="gone">
181            </TabWidget>
182            <View
183                android:id="@androidprv:id/resolver_tab_divider"
184                android:visibility="gone"
185                android:layout_width="match_parent"
186                android:layout_height="1dp"
187                android:background="?android:attr/colorBackground"
188                android:foreground="?android:attr/dividerVertical"/>
189            <FrameLayout
190                android:id="@android:id/tabcontent"
191                android:layout_width="match_parent"
192                android:layout_height="wrap_content">
193                <com.android.intentresolver.ResolverViewPager
194                    android:id="@androidprv:id/profile_pager"
195                    android:layout_width="match_parent"
196                    android:layout_height="wrap_content" />
197            </FrameLayout>
198        </LinearLayout>
199    </TabHost>
200
201    <View
202        app:layout_alwaysShow="true"
203        android:layout_width="match_parent"
204        android:layout_height="1dp"
205        android:background="?android:attr/colorBackground"
206        android:foreground="?android:attr/dividerVertical" />
207</com.android.intentresolver.widget.ResolverDrawerLayout>
208