Add app permission sheet

This commit is contained in:
Rahul Kumar Patel
2021-02-27 01:01:20 +05:30
parent 13a7a3b179
commit 8ebb362f58
16 changed files with 635 additions and 9 deletions

View File

@@ -96,14 +96,18 @@
android:layout_height="wrap_content"
android:clipToPadding="false"
android:orientation="vertical"
android:overScrollMode="never"
android:paddingStart="@dimen/padding_small"
android:paddingEnd="@dimen/padding_small"
app:itemSpacing="@dimen/margin_small"
android:scrollbars="none"
android:overScrollMode="never"
app:itemSpacing="@dimen/margin_small"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/view_app" />
<include
android:id="@+id/layout_details_permissions"
layout="@layout/layout_details_permissions" />
<include
android:id="@+id/layout_details_dev"
layout="@layout/layout_details_dev" />

View File

@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Aurora Store
~ Copyright (C) 2021, Rahul Kumar Patel <whyorean@gmail.com>
~
~ Aurora Store is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 2 of the License, or
~ (at your option) any later version.
~
~ Aurora Store is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with Aurora Store. If not, see <http://www.gnu.org/licenses/>.
~
-->
<LinearLayout 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:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="@drawable/divider"
android:orientation="vertical"
android:paddingStart="@dimen/padding_large"
android:paddingEnd="@dimen/padding_small"
android:showDividers="middle">
<com.aurora.store.view.custom.layouts.ActionHeaderLayout
android:id="@+id/header_permission"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:headerTitle="@string/details_permission" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/txt_permission_count"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.Aurora.Line1"
tools:text="16 permissions" />
</LinearLayout>

View File

@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Aurora Store
~ Copyright (C) 2021, Rahul Kumar Patel <whyorean@gmail.com>
~
~ Aurora Store is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 2 of the License, or
~ (at your option) any later version.
~
~ Aurora Store is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with Aurora Store. If not, see <http://www.gnu.org/licenses/>.
~
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
tools:targetApi="o">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/permissions_header"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="@dimen/margin_normal"
android:layout_marginBottom="@dimen/margin_small"
android:paddingHorizontal="@dimen/margin_normal"
android:text="@string/details_permission"
android:textAppearance="@style/TextAppearance.Aurora.Title" />
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/padding_medium"
android:scrollbars="none">
<LinearLayout
android:id="@+id/permissions_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/permissions_container_widgets"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/permissions_none"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/details_no_permission"
android:textAppearance="@style/TextAppearance.Aurora.Line1"
android:visibility="gone" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>

View File

@@ -35,7 +35,7 @@
<View
android:layout_width="4dp"
android:layout_height="match_parent"
android:layout_marginStart="@dimen/padding_xxsmall"
android:layout_marginStart="@dimen/padding_xsmall"
android:background="?colorAccent" />
<TextView
@@ -57,7 +57,7 @@
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/margin_small"
android:layout_marginEnd="@dimen/margin_small"
android:padding="@dimen/padding_xsmall"
android:background="?selectableItemBackgroundBorderless"
android:visibility="invisible"
app:srcCompat="@drawable/ic_arrow_right"

View File

@@ -57,6 +57,7 @@
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/margin_small"
android:background="?selectableItemBackgroundBorderless"
android:padding="@dimen/padding_xsmall"
app:srcCompat="@drawable/ic_arrow_right"
app:tint="?android:textColorPrimary" />

View File

@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Aurora Store
~ Copyright (C) 2021, Rahul Kumar Patel <whyorean@gmail.com>
~
~ Aurora Store is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 2 of the License, or
~ (at your option) any later version.
~
~ Aurora Store is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with Aurora Store. If not, see <http://www.gnu.org/licenses/>.
~
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/margin_xxsmall"
android:paddingBottom="@dimen/margin_xxsmall">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/img"
android:layout_width="@dimen/icon_size_default"
android:layout_height="@dimen/icon_size_default"
android:layout_marginStart="@dimen/margin_small"
android:layout_marginEnd="@dimen/margin_small" />
<LinearLayout
android:id="@+id/permission_labels"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_alignParentTop="true"
android:layout_toEndOf="@id/img"
android:orientation="vertical"
android:textAppearance="@style/TextAppearance.Aurora.Line1" />
</RelativeLayout>