grant_credentials_permission.xml revision 1d71ef6fd649e0e04a5b69e2a21e28c0076ece05
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="match_parent"
24    android:layout_height="match_parent"
25    android:divider="?android:attr/dividerHorizontal"
26    android:showDividers="middle"
27    android:dividerPadding="0dip" >
28
29    <!-- The list of packages that correspond to the requesting UID
30    and the account/authtokenType that is being requested -->
31    <ScrollView
32        android:layout_width="match_parent"
33        android:layout_height="wrap_content"
34        android:fillViewport="true"
35        android:layout_weight="1"
36        android:gravity="top|center_horizontal">
37
38        <LinearLayout
39            android:layout_width="match_parent"
40            android:layout_height="match_parent"
41            android:paddingTop="14dip"
42            android:orientation="vertical">
43
44            <TextView
45                android:id="@+id/grant_credentials_permission_message_header"
46                android:layout_width="wrap_content"
47                android:layout_height="wrap_content"
48                android:text="@string/grant_credentials_permission_message_header"
49                android:textAppearance="?android:attr/textAppearanceMedium"
50                android:paddingLeft="19dip"
51                android:paddingBottom="12dip" />
52
53            <LinearLayout
54                android:id="@+id/packages_list"
55                android:orientation="vertical"
56                android:paddingLeft="16dip"
57                android:paddingRight="12dip"
58                android:layout_width="match_parent"
59                android:layout_height="wrap_content" />
60
61            <RelativeLayout
62                android:paddingLeft="16dip"
63                android:paddingRight="12dip"
64                android:layout_width="match_parent"
65                android:layout_height="wrap_content">
66
67                <ImageView
68                    android:id="@+id/permission_icon"
69                    android:layout_width="30dip"
70                    android:layout_height="30dip"
71                    android:src="@drawable/ic_bullet_key_permission"
72                    android:layout_alignParentLeft="true"
73                    android:scaleType="fitCenter" />
74
75                <TextView
76                    android:id="@+id/account_type"
77                    android:textAppearance="?android:attr/textAppearanceMedium"
78                    android:textColor="@color/perms_dangerous_perm_color"
79                    android:textStyle="bold"
80                    android:paddingLeft="6dip"
81                    android:layout_toRightOf="@id/permission_icon"
82                    android:layout_width="wrap_content"
83                    android:layout_height="wrap_content" />
84
85                <TextView
86                    android:id="@+id/account_name"
87                    android:textAppearance="?android:attr/textAppearanceSmall"
88                    android:textColor="@color/perms_dangerous_perm_color"
89                    android:layout_marginTop="-4dip"
90                    android:paddingBottom="8dip"
91                    android:paddingLeft="6dip"
92                    android:layout_below="@id/account_type"
93                    android:layout_toRightOf="@id/permission_icon"
94                    android:layout_width="wrap_content"
95                    android:layout_height="wrap_content" />
96
97                <TextView
98                    android:id="@+id/authtoken_type"
99                    android:textAppearance="?android:attr/textAppearanceMedium"
100                    android:textColor="@color/perms_dangerous_perm_color"
101                    android:textStyle="bold"
102                    android:layout_marginTop="-4dip"
103                    android:paddingBottom="8dip"
104                    android:paddingLeft="6dip"
105                    android:layout_below="@id/account_name"
106                    android:layout_toRightOf="@id/permission_icon"
107                    android:layout_width="wrap_content"
108                    android:layout_height="wrap_content" />
109            </RelativeLayout>
110
111            <TextView
112                android:id="@+id/grant_credentials_permission_message_footer"
113                android:layout_width="wrap_content"
114                android:layout_height="wrap_content"
115                android:text="@string/grant_credentials_permission_message_footer"
116                android:textAppearance="?android:attr/textAppearanceMedium"
117                android:paddingLeft="19dip"
118                android:paddingBottom="12dip" />
119        </LinearLayout>
120    </ScrollView>
121
122    <!-- The buttons to allow or deny -->
123    <LinearLayout
124        android:id="@+id/buttons"
125        android:layout_width="match_parent"
126        android:layout_height="wrap_content"
127        style="?android:attr/buttonBarStyle">
128
129        <Button
130            android:id="@+id/deny_button"
131            android:text="@string/deny"
132            android:layout_width="0dip"
133            android:layout_height="wrap_content"
134            android:layout_weight="2"
135            style="?android:attr/buttonBarButtonStyle" />
136
137        <Button
138            android:id="@+id/allow_button"
139            android:text="@string/allow"
140            android:layout_width="0dip"
141            android:layout_height="wrap_content"
142            android:layout_weight="2"
143            style="?android:attr/buttonBarButtonStyle" />
144
145    </LinearLayout>
146</LinearLayout>
147
148