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