summaryrefslogtreecommitdiffstats
path: root/res/layout-watch
diff options
context:
space:
mode:
authorAnthony Hugh <ahugh@google.com>2015-08-19 11:44:43 -0700
committerAnthony Hugh <ahugh@google.com>2015-08-21 16:21:28 -0700
commit9478120abc48a8934e5de14f7cf49342cef5485c (patch)
treee995ef96a7dc37c4c079c46e9b87a94a0d454d77 /res/layout-watch
parent24938647726a06f636dc8c9f1195a378ebb07995 (diff)
downloadandroid_packages_apps_PackageInstaller-9478120abc48a8934e5de14f7cf49342cef5485c.tar.gz
android_packages_apps_PackageInstaller-9478120abc48a8934e5de14f7cf49342cef5485c.tar.bz2
android_packages_apps_PackageInstaller-9478120abc48a8934e5de14f7cf49342cef5485c.zip
Implement base version of GrantPermissions dialog
With the Emerald release, we need to support the new permission APIs. This changelist adds a dialog for the Activity.requestPermissions() API so that users can request permissions. This check in is a functional version, but not polished. will need to be a follow up CL to add the correct animations and update the UI to the appropriate redlines. The implementation for the confirmation dialog is modeled after the one in the clockwork libs/Views folder. There are some tweaks to match the designed behavior of the permission dialog. When there's more time in the future, we should try to condense this to one implementation. This is a resubmit without the wearable-support lib. I will figure out how to get that referenced in the next UI pass. BUG: 23118402 Change-Id: Ib2fb94b356aa965b999b3e12726fda86928a963e
Diffstat (limited to 'res/layout-watch')
-rw-r--r--res/layout-watch/grant_permissions.xml121
1 files changed, 121 insertions, 0 deletions
diff --git a/res/layout-watch/grant_permissions.xml b/res/layout-watch/grant_permissions.xml
new file mode 100644
index 00000000..2d567068
--- /dev/null
+++ b/res/layout-watch/grant_permissions.xml
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2015 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<FrameLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@+id/confirmation"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ >
+
+ <ScrollView
+ android:id="@+id/scrolling_container"
+ android:overScrollMode="never"
+ android:scrollbars="none"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <LinearLayout
+ android:id="@+id/content"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <TextView
+ android:id="@+id/current_page_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:layout_marginBottom="@dimen/grant_permissions_app_breadcrumb_margin_bottom"
+ android:textAppearance="@style/GrantPermissions.BreadcrumbText" />
+
+ <ImageView
+ android:id="@+id/icon"
+ android:layout_width="@dimen/grant_permissions_app_icon_size"
+ android:layout_height="@dimen/grant_permissions_app_icon_size"
+ android:tint="@color/grant_permissions_app_color"
+ android:layout_gravity="center"
+ android:layout_marginTop="@dimen/grant_permissions_app_icon_margin_top"/>
+
+ <TextView
+ android:id="@+id/message"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="10dp"
+ android:paddingLeft="16dp"
+ android:paddingRight="16dp"
+ android:textSize="20sp"
+ android:gravity="center"
+ android:fontFamily="sans-serif-condensed-light"
+ android:textAppearance="@style/GrantPermissions.TitleText"/>
+
+ <!-- TODO: Change this to use a ViewStub instead of show/hiding the two layouts -->
+ <FrameLayout android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:id="@+id/button_bar_container"
+ android:layout_gravity="bottom"
+ android:background="#FF606060">
+ <FrameLayout
+ android:id="@+id/horizontal_button_bar"
+ android:layout_width="match_parent"
+ android:layout_height="72dp">
+ <Button
+ android:id="@+id/horizontal_deny_button"
+ android:layout_width="54dp"
+ android:layout_height="54dp"
+ android:layout_gravity="top|left"
+ android:layout_marginLeft="16dp"
+ android:layout_marginTop="9dp"
+ android:background="@drawable/cancel_button"/>
+
+ <Button
+ android:id="@+id/horizontal_allow_button"
+ android:layout_width="54dp"
+ android:layout_height="54dp"
+ android:layout_gravity="top|right"
+ android:layout_marginRight="16dp"
+ android:layout_marginTop="9dp"
+ android:background="@drawable/confirm_button"/>
+ </FrameLayout>
+
+ <FrameLayout
+ android:id="@+id/vertical_button_bar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:visibility="gone">
+ <LinearLayout
+ android:id="@+id/buttonPanel"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+ <Button
+ android:id="@+id/vertical_allow_button"
+ style="@style/Widget.WearDiag.Button"/>
+
+ <Button
+ android:id="@+id/vertical_deny_button"
+ style="@style/Widget.WearDiag.Button"/>
+
+ <Button
+ android:id="@+id/vertical_deny_do_not_ask_again_button"
+ style="@style/Widget.WearDiag.Button"/>
+ </LinearLayout>
+ </FrameLayout>
+ </FrameLayout>
+ </LinearLayout>
+ </ScrollView>
+</FrameLayout> \ No newline at end of file