Android O SDK.
[android_tools.git] / sdk / platforms / android-26 / data / res / layout / screen_title_icons.xml
blobf145429b4702bf9524667156a6fd21ecb9adc6ae
1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- Copyright (C) 2006 The Android Open Source Project
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 -->
17 <!--
18 This is the basic layout for a screen, with all of its features enabled.
19 -->
21 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
22     android:fitsSystemWindows="true"
23     android:orientation="vertical"
24     android:layout_width="match_parent"
25     android:layout_height="match_parent">
26     <!-- Popout bar for action modes -->
27     <ViewStub android:id="@+id/action_mode_bar_stub"
28               android:inflatedId="@+id/action_mode_bar"
29               android:layout="@layout/action_mode_bar"
30               android:layout_width="match_parent"
31               android:layout_height="wrap_content"
32               android:theme="?attr/actionBarTheme"/>
33     <RelativeLayout android:id="@android:id/title_container"
34         style="?android:attr/windowTitleBackgroundStyle"
35         android:layout_width="match_parent"
36         android:layout_height="?android:attr/windowTitleSize">
37         <!-- The title background has 9px left padding. -->
38         <ImageView android:id="@android:id/left_icon"
39             android:visibility="gone"
40             android:layout_marginEnd="9dip"
41             android:layout_width="16dip"
42             android:layout_height="16dip"
43             android:scaleType="fitCenter"
44             android:layout_alignParentStart="true"
45             android:layout_centerVertical="true" />
46         <ProgressBar android:id="@+id/progress_circular"
47             style="?android:attr/progressBarStyleSmallTitle"
48             android:visibility="gone"
49             android:max="10000"
50             android:layout_centerVertical="true"
51             android:layout_alignParentEnd="true"
52             android:layout_marginStart="6dip"
53             android:layout_width="wrap_content"
54             android:layout_height="wrap_content" />
55         <!-- There are 6dip between this and the circular progress on the right, we
56              also make 6dip (with the -3dip margin_left) to the icon on the left or
57              the screen left edge if no icon. This also places our left edge 3dip to
58              the left of the title text left edge. -->
59         <ProgressBar android:id="@+id/progress_horizontal"
60             style="?android:attr/progressBarStyleHorizontal"
61             android:layout_width="match_parent"
62             android:layout_height="wrap_content"
63             android:layout_marginStart="-3dip"
64             android:layout_toStartOf="@android:id/progress_circular"
65             android:layout_toEndOf="@android:id/left_icon"
66             android:layout_centerVertical="true"
67             android:visibility="gone"
68             android:max="10000" />
69         <LinearLayout
70             android:layout_width="match_parent"
71             android:layout_height="match_parent"
72             android:orientation="horizontal"
73             android:layout_toStartOf="@id/progress_circular"
74             android:layout_toEndOf="@android:id/left_icon"
75             >
76             <TextView android:id="@android:id/title"
77                 style="?android:attr/windowTitleStyle"
78                 android:layout_width="0dip"
79                 android:layout_height="match_parent"
80                 android:layout_weight="1"
81                 android:background="@null"
82                 android:fadingEdge="horizontal"
83                 android:scrollHorizontally="true"
84                 android:gravity="center_vertical"
85                 android:layout_marginEnd="2dip"
86                 />
87             <!-- 2dip between the icon and the title text, if icon is present. -->
88             <ImageView android:id="@android:id/right_icon"
89                 android:visibility="gone"
90                 android:layout_width="16dip"
91                 android:layout_height="16dip"
92                 android:layout_weight="0"
93                 android:layout_gravity="center_vertical"
94                 android:scaleType="fitCenter"
95                 />
96             </LinearLayout>
97     </RelativeLayout>
98     <FrameLayout android:id="@android:id/content"
99         android:layout_width="match_parent"
100         android:layout_height="0dip"
101         android:layout_weight="1"
102         android:foregroundGravity="fill_horizontal|top"
103         android:foreground="?android:attr/windowContentOverlay" />
104 </LinearLayout>