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 12:44:43 -0700
commitb7da1f5f9886ff8a4ad81b0d617d442c461ca1e5 (patch)
tree5ed7a00b0c862f255b2ff0ad7585d56898055abc /res/layout-watch
parent2b9cdf4e64d49c24658a5ca7e10633364ef2c1f2 (diff)
downloadandroid_packages_apps_PackageInstaller-b7da1f5f9886ff8a4ad81b0d617d442c461ca1e5.tar.gz
android_packages_apps_PackageInstaller-b7da1f5f9886ff8a4ad81b0d617d442c461ca1e5.tar.bz2
android_packages_apps_PackageInstaller-b7da1f5f9886ff8a4ad81b0d617d442c461ca1e5.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. BUG: 23118402 Change-Id: Ic90d37a2ce8a7adacb7c4e004b0a5260b624f5c8
Diffstat (limited to 'res/layout-watch')
-rw-r--r--res/layout-watch/grant_permissions.xml126
1 files changed, 126 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..80ed5b92
--- /dev/null
+++ b/res/layout-watch/grant_permissions.xml
@@ -0,0 +1,126 @@
+<?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">
+ <android.support.wearable.view.WearableFrameLayout
+ android:id="@+id/horizontal_button_bar"
+ android:layout_width="match_parent"
+ android:layout_height="72dp"
+ app:layout_heightRound="96dp">
+ <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"
+ app:layout_marginLeftRound="36dp"
+ app:layout_marginTopRound="12dp"
+ 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"
+ app:layout_marginRightRound="36dp"
+ app:layout_marginTopRound="12dp"
+ android:background="@drawable/confirm_button"/>
+ </android.support.wearable.view.WearableFrameLayout>
+
+ <android.support.wearable.view.WearableFrameLayout
+ 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>
+ </android.support.wearable.view.WearableFrameLayout>
+ </FrameLayout>
+ </LinearLayout>
+ </ScrollView>
+</FrameLayout> \ No newline at end of file