screen.xml revision a9ddb8dc23b253c53f24ceb81e9d596c072d834e
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<!-- Title bar and content -->
22<LinearLayout  xmlns:android="http://schemas.android.com/apk/res/android"
23    android:fitsSystemWindows="true"
24    android:orientation="vertical"
25    android:layout_width="match_parent"
26    android:layout_height="match_parent"
27>
28    <!-- Popout bar for action modes -->
29    <ViewStub android:id="@+id/action_mode_bar_stub"
30              android:inflatedId="@+id/action_mode_bar"
31              android:layout="@layout/action_mode_bar"
32              android:layout_width="match_parent"
33              android:layout_height="wrap_content"
34              android:theme="?attr/actionBarTheme" />
35
36    <!-- Title bar -->
37    <RelativeLayout android:id="@android:id/title_container"
38        style="?android:attr/windowTitleBackgroundStyle"
39        android:layout_width="match_parent"
40        android:layout_height="?android:attr/windowTitleSize"
41    >
42        <ImageView android:id="@android:id/left_icon"
43            android:layout_width="16dip"
44            android:layout_height="16dip"
45            android:layout_marginEnd="5dip"
46            android:layout_alignParentStart="true"
47            android:layout_centerVertical="true"
48            android:visibility="gone"
49            android:scaleType="fitCenter"
50        />
51        <LinearLayout android:id="@+android:id/right_container"
52            android:layout_width="wrap_content"
53            android:layout_height="wrap_content"
54            android:layout_alignParentEnd="true"
55            android:layout_centerVertical="true"
56        >
57            <ImageView android:id="@android:id/right_icon"
58                android:layout_width="16dip"
59                android:layout_height="16dip"
60                android:layout_marginStart="5dip"
61                android:layout_gravity="center_vertical"
62                android:visibility="gone"
63                android:scaleType="fitCenter"
64            />
65            <ProgressBar android:id="@+id/progress_circular"
66                style="?android:attr/progressBarStyleSmallTitle"
67                android:layout_width="wrap_content"
68                android:layout_height="wrap_content"
69                android:layout_marginStart="5dip"
70                android:layout_gravity="center_vertical"
71                android:visibility="gone"
72                android:max="10000"
73            />
74        </LinearLayout>
75        <ProgressBar android:id="@+id/progress_horizontal"
76            style="?android:attr/progressBarStyleHorizontal"
77            android:layout_width="match_parent"
78            android:layout_height="wrap_content"
79            android:layout_marginStart="2dip"
80            android:layout_toStartOf="@android:id/right_container"
81            android:layout_toEndOf="@android:id/left_icon"
82            android:layout_centerVertical="true"
83            android:visibility="gone"
84            android:max="10000"
85        />
86        <TextView android:id="@android:id/title"
87            style="?android:attr/windowTitleStyle"
88            android:layout_width="match_parent"
89            android:layout_height="match_parent"
90            android:background="@null"
91            android:fadingEdge="horizontal"
92            android:scrollHorizontally="true"
93            android:gravity="center_vertical"
94            android:layout_toStartOf="@android:id/right_container"
95            android:layout_toEndOf="@id/left_icon"
96        />
97    </RelativeLayout>
98
99    <!-- Content -->
100    <FrameLayout android:id="@android:id/content"
101        android:layout_width="match_parent"
102        android:layout_height="0dip"
103        android:layout_weight="1"
104        android:foregroundGravity="fill_horizontal|top"
105        android:foreground="?android:attr/windowContentOverlay"
106    />
107</LinearLayout>
108