grant_credentials_permission.xml revision c4989b1b75848acbeaf53850fbcfbf2f8812e325
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3/**
4 * Copyright (c) 2008, Google Inc.
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
20<LinearLayout
21    xmlns:android="http://schemas.android.com/apk/res/android"
22    android:orientation="vertical"
23    android:layout_width="fill_parent"
24    android:layout_height="fill_parent">
25
26    <!-- The header -->
27    <TextView
28        android:id="@+id/header_text"
29        android:layout_width="fill_parent"
30        android:layout_height="wrap_content"
31        android:textAppearance="?android:attr/textAppearanceMedium"
32        android:textColor="@color/white"
33        android:textStyle="bold"
34        android:text="@string/grant_permissions_header_text"
35        android:shadowColor="@color/shadow"
36        android:shadowRadius="2"
37        android:singleLine="true"
38        android:background="@drawable/title_bar_medium"
39        android:gravity="left|center_vertical"
40	android:paddingLeft="19dip"
41        android:ellipsize="marquee" />
42
43    <!-- The list of packages that correspond to the requesting UID
44    and the account/authtokenType that is being requested -->
45    <ScrollView
46        android:layout_width="fill_parent"
47        android:layout_height="wrap_content"
48        android:fillViewport="true"
49        android:layout_weight="1"
50        android:gravity="top|center_horizontal"
51        android:foreground="@drawable/title_bar_shadow">
52
53        <LinearLayout
54            android:layout_width="fill_parent"
55            android:layout_height="fill_parent"
56            android:paddingTop="14dip"
57            android:orientation="vertical">
58
59            <TextView
60                android:id="@+id/grant_credentials_permission_message_header"
61                android:layout_width="wrap_content"
62                android:layout_height="wrap_content"
63                android:text="@string/grant_credentials_permission_message_header"
64                android:textAppearance="?android:attr/textAppearanceMedium"
65                android:paddingLeft="19dip"
66                android:paddingBottom="12dip" />
67
68            <LinearLayout
69                android:id="@+id/packages_list"
70                android:orientation="vertical"
71                android:paddingLeft="16dip"
72                android:paddingRight="12dip"
73                android:layout_width="fill_parent"
74                android:layout_height="wrap_content" />
75
76            <RelativeLayout
77                android:paddingLeft="16dip"
78                android:paddingRight="12dip"
79                android:layout_width="fill_parent"
80                android:layout_height="wrap_content">
81
82                <ImageView
83                    android:id="@+id/permission_icon"
84                    android:layout_width="30dip"
85                    android:layout_height="30dip"
86                    android:src="@drawable/ic_bullet_key_permission"
87                    android:layout_alignParentLeft="true"
88                    android:scaleType="fitCenter" />
89
90                <TextView
91                    android:id="@+id/account_type"
92                    android:textAppearance="?android:attr/textAppearanceMedium"
93                    android:textColor="@color/perms_dangerous_perm_color"
94                    android:textStyle="bold"
95                    android:paddingLeft="6dip"
96                    android:layout_toRightOf="@id/permission_icon"
97                    android:layout_width="wrap_content"
98                    android:layout_height="wrap_content" />
99
100                <TextView
101                    android:id="@+id/account_name"
102                    android:textAppearance="?android:attr/textAppearanceSmall"
103                    android:textColor="@color/perms_dangerous_perm_color"
104                    android:layout_marginTop="-4dip"
105                    android:paddingBottom="8dip"
106                    android:paddingLeft="6dip"
107                    android:layout_below="@id/account_type"
108                    android:layout_toRightOf="@id/permission_icon"
109                    android:layout_width="wrap_content"
110                    android:layout_height="wrap_content" />
111
112                <TextView
113                    android:id="@+id/authtoken_type"
114                    android:textAppearance="?android:attr/textAppearanceMedium"
115                    android:textColor="@color/perms_dangerous_perm_color"
116                    android:textStyle="bold"
117                    android:layout_marginTop="-4dip"
118                    android:paddingBottom="8dip"
119                    android:paddingLeft="6dip"
120                    android:layout_below="@id/account_name"
121                    android:layout_toRightOf="@id/permission_icon"
122                    android:layout_width="wrap_content"
123                    android:layout_height="wrap_content" />
124            </RelativeLayout>
125
126            <TextView
127                android:id="@+id/grant_credentials_permission_message_footer"
128                android:layout_width="wrap_content"
129                android:layout_height="wrap_content"
130                android:text="@string/grant_credentials_permission_message_footer"
131                android:textAppearance="?android:attr/textAppearanceMedium"
132                android:paddingLeft="19dip"
133                android:paddingBottom="12dip" />
134        </LinearLayout>
135    </ScrollView>
136
137    <!-- The buttons to allow or deny -->
138    <LinearLayout
139        android:id="@+id/buttons"
140        android:layout_width="fill_parent"
141        android:layout_height="52dip"
142        android:background="@drawable/bottom_bar"
143        android:paddingTop="4dip"
144        android:paddingLeft="2dip"
145        android:paddingRight="2dip">
146
147        <Button
148            android:id="@+id/allow_button"
149            android:text="@string/allow"
150            android:layout_width="0dip"
151            android:layout_height="wrap_content"
152            android:layout_weight="2" />
153
154        <Button
155            android:id="@+id/deny_button"
156            android:text="@string/deny"
157            android:layout_width="0dip"
158            android:layout_height="wrap_content"
159            android:layout_weight="2" />
160
161    </LinearLayout>
162</LinearLayout>
163
164