summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorChristofer Ã…kersten <akersten@google.com>2019-03-01 00:27:39 -0800
committerChristofer Ã…kersten <akersten@google.com>2019-03-05 15:26:58 -0800
commitc89934aa5096fdb725d3b68878888fd04425b2c3 (patch)
tree292e87d300241d776d2d73a77e8980603588b16b /res
parent897927296e3dea8b3a309233b3ea1afa3e72df0f (diff)
downloadUniversalMediaPlayer-c89934aa5096fdb725d3b68878888fd04425b2c3.tar.gz
Add permission request UX
Bug: 123328776 Test: manual Change-Id: I66eb8ed2f3f31ed95050860154f0fc1aa1a562ff
Diffstat (limited to 'res')
-rw-r--r--res/layout/fragment_permission.xml76
1 files changed, 76 insertions, 0 deletions
diff --git a/res/layout/fragment_permission.xml b/res/layout/fragment_permission.xml
new file mode 100644
index 0000000..8a0908c
--- /dev/null
+++ b/res/layout/fragment_permission.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright 2019 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.
+-->
+
+<androidx.constraintlayout.widget.ConstraintLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <com.android.pump.widget.UriImageView
+ android:id="@+id/fragment_permission_image"
+ android:layout_width="222dp"
+ android:layout_height="222dp"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toTopOf="@id/fragment_permission_text1"
+ app:layout_constraintVertical_chainStyle="packed"
+ app:srcCompat="@drawable/ic_placeholder"/>
+
+ <androidx.appcompat.widget.AppCompatTextView
+ android:id="@+id/fragment_permission_text1"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="24dp"
+ android:layout_marginStart="24dp"
+ android:layout_marginEnd="24dp"
+ android:gravity="center_horizontal"
+ android:textSize="24sp"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintTop_toBottomOf="@id/fragment_permission_image"
+ app:layout_constraintBottom_toTopOf="@id/fragment_permission_text2"
+ android:text="Start the show"/>
+
+ <androidx.appcompat.widget.AppCompatTextView
+ android:id="@+id/fragment_permission_text2"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="24dp"
+ android:layout_marginStart="24dp"
+ android:layout_marginEnd="24dp"
+ android:gravity="center_horizontal"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintTop_toBottomOf="@id/fragment_permission_text1"
+ app:layout_constraintBottom_toTopOf="@id/fragment_permission_button"
+ android:text=
+ "To play your videos and audios, allow access to the media files on your device."/>
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/fragment_permission_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="24dp"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintTop_toBottomOf="@id/fragment_permission_text2"
+ app:layout_constraintBottom_toBottomOf="parent"
+ android:text="Allow Access"/>
+
+</androidx.constraintlayout.widget.ConstraintLayout>