From 7996a94ad38285c78e4cb00cee8033eed2693e3f Mon Sep 17 00:00:00 2001 From: Mathieu Date: Mon, 3 Jan 2022 21:42:42 +0100 Subject: [PATCH] Added permission page --- .idea/misc.xml | 7 ++ app/build.gradle | 2 + app/src/main/AndroidManifest.xml | 4 + .../jarvis/android/MainActivity.kt | 1 - .../jarvis/android/nav/Navigation.kt | 9 ++ .../jarvis/android/nav/Screen.kt | 1 + .../jarvis/android/pages/PermissionsPage.kt | 98 +++++++++++++++++++ .../main/res/drawable/ic_baseline_mic_24.xml | 17 ++-- .../res/drawable/ic_baseline_shield_24.xml | 11 +++ 9 files changed, 140 insertions(+), 10 deletions(-) create mode 100644 app/src/main/java/ch/mathieubroillet/jarvis/android/pages/PermissionsPage.kt create mode 100644 app/src/main/res/drawable/ic_baseline_shield_24.xml diff --git a/.idea/misc.xml b/.idea/misc.xml index ba93dbf..d3c4b08 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -25,10 +25,17 @@ + + + + + + + diff --git a/app/build.gradle b/app/build.gradle index c7c56f8..698674d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -56,6 +56,8 @@ dependencies { implementation "androidx.compose.material:material:$compose_version" implementation "androidx.compose.ui:ui-tooling-preview:$compose_version" implementation "androidx.navigation:navigation-compose:2.4.0-rc01" + implementation 'com.google.accompanist:accompanist-permissions:0.22.0-rc' + implementation 'com.google.accompanist:accompanist-insets:0.22.0-rc' implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.4.0' implementation 'androidx.activity:activity-compose:1.4.0' testImplementation 'junit:junit:4.13.2' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 573e1fc..ebf7c40 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -2,6 +2,10 @@ + + + + - - +android:height="24dp" +android:width="24dp" +android:viewportWidth="24" +android:viewportHeight="24" +android:tint="?attr/colorControlNormal"> + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_baseline_shield_24.xml b/app/src/main/res/drawable/ic_baseline_shield_24.xml new file mode 100644 index 0000000..4aab7f1 --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_shield_24.xml @@ -0,0 +1,11 @@ + + + + \ No newline at end of file