grant_credentials_permission.xml revision 0a3ab5d632e16ef86bdc05bc45a16b016f02e3f1
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 26 <!-- The header --> 27 <TextView 28 android:id="@+id/header_text" 29 android:layout_width="match_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="match_parent" 47 android:layout_height="wrap_content" 48 android:fillViewport="true" 49 android:layout_weight="1" 50 android:gravity="top|center_horizontal"> 51 52 <LinearLayout 53 android:layout_width="match_parent" 54 android:layout_height="match_parent" 55 android:paddingTop="14dip" 56 android:orientation="vertical"> 57 58 <TextView 59 android:id="@+id/grant_credentials_permission_message_header" 60 android:layout_width="wrap_content" 61 android:layout_height="wrap_content" 62 android:text="@string/grant_credentials_permission_message_header" 63 android:textAppearance="?android:attr/textAppearanceMedium" 64 android:paddingLeft="19dip" 65 android:paddingBottom="12dip" /> 66 67 <LinearLayout 68 android:id="@+id/packages_list" 69 android:orientation="vertical" 70 android:paddingLeft="16dip" 71 android:paddingRight="12dip" 72 android:layout_width="match_parent" 73 android:layout_height="wrap_content" /> 74 75 <RelativeLayout 76 android:paddingLeft="16dip" 77 android:paddingRight="12dip" 78 android:layout_width="match_parent" 79 android:layout_height="wrap_content"> 80 81 <ImageView 82 android:id="@+id/permission_icon" 83 android:layout_width="30dip" 84 android:layout_height="30dip" 85 android:src="@drawable/ic_bullet_key_permission" 86 android:layout_alignParentLeft="true" 87 android:scaleType="fitCenter" /> 88 89 <TextView 90 android:id="@+id/account_type" 91 android:textAppearance="?android:attr/textAppearanceMedium" 92 android:textColor="@color/perms_dangerous_perm_color" 93 android:textStyle="bold" 94 android:paddingLeft="6dip" 95 android:layout_toRightOf="@id/permission_icon" 96 android:layout_width="wrap_content" 97 android:layout_height="wrap_content" /> 98 99 <TextView 100 android:id="@+id/account_name" 101 android:textAppearance="?android:attr/textAppearanceSmall" 102 android:textColor="@color/perms_dangerous_perm_color" 103 android:layout_marginTop="-4dip" 104 android:paddingBottom="8dip" 105 android:paddingLeft="6dip" 106 android:layout_below="@id/account_type" 107 android:layout_toRightOf="@id/permission_icon" 108 android:layout_width="wrap_content" 109 android:layout_height="wrap_content" /> 110 111 <TextView 112 android:id="@+id/authtoken_type" 113 android:textAppearance="?android:attr/textAppearanceMedium" 114 android:textColor="@color/perms_dangerous_perm_color" 115 android:textStyle="bold" 116 android:layout_marginTop="-4dip" 117 android:paddingBottom="8dip" 118 android:paddingLeft="6dip" 119 android:layout_below="@id/account_name" 120 android:layout_toRightOf="@id/permission_icon" 121 android:layout_width="wrap_content" 122 android:layout_height="wrap_content" /> 123 </RelativeLayout> 124 125 <TextView 126 android:id="@+id/grant_credentials_permission_message_footer" 127 android:layout_width="wrap_content" 128 android:layout_height="wrap_content" 129 android:text="@string/grant_credentials_permission_message_footer" 130 android:textAppearance="?android:attr/textAppearanceMedium" 131 android:paddingLeft="19dip" 132 android:paddingBottom="12dip" /> 133 </LinearLayout> 134 </ScrollView> 135 136 <!-- The buttons to allow or deny --> 137 <LinearLayout 138 android:id="@+id/buttons" 139 android:layout_width="match_parent" 140 android:layout_height="52dip" 141 android:background="@drawable/bottom_bar" 142 android:paddingTop="4dip" 143 android:paddingLeft="2dip" 144 android:paddingRight="2dip"> 145 146 <Button 147 android:id="@+id/allow_button" 148 android:text="@string/allow" 149 android:layout_width="0dip" 150 android:layout_height="wrap_content" 151 android:layout_weight="2" /> 152 153 <Button 154 android:id="@+id/deny_button" 155 android:text="@string/deny" 156 android:layout_width="0dip" 157 android:layout_height="wrap_content" 158 android:layout_weight="2" /> 159 160 </LinearLayout> 161</LinearLayout> 162 163