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

@@ -40,7 +40,7 @@ fun Context.showDialog(@StringRes titleId: Int, @StringRes messageId: Int) {
}
}
fun Context.showDialog(title: String, message: String) {
fun Context.showDialog(title: String?, message: String?) {
runOnUiThread {
val backgroundColor: Int = getStyledAttributeColor(android.R.attr.colorBackground)
val builder = MaterialAlertDialogBuilder(this).apply {

View File

@@ -0,0 +1,39 @@
/*
* 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/>.
*
*/
package com.aurora.store.data.model
data class AppPermission(
var name: String,
var permission: String,
var raw: String,
var flags: Int,
var icon: Int
) {
override fun equals(other: Any?): Boolean {
return when (other) {
is AppPermission -> other.permission == permission
else -> false
}
}
override fun hashCode(): Int {
return permission.hashCode()
}
}

View File

@@ -0,0 +1,166 @@
/*
* 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/>.
*
*/
package com.aurora.store.view.custom.layouts
import android.annotation.TargetApi
import android.content.Context
import android.content.pm.PackageManager
import android.content.pm.PermissionGroupInfo
import android.content.pm.PermissionInfo
import android.content.res.Resources.NotFoundException
import android.graphics.drawable.Drawable
import android.os.Build
import android.util.AttributeSet
import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.TextView
import androidx.core.content.ContextCompat
import com.aurora.extensions.showDialog
import com.aurora.store.R
import java.util.*
class PermissionGroup : LinearLayout {
private lateinit var permissionGroupInfo: PermissionGroupInfo
private lateinit var packageManager: PackageManager
private val permissionMap: MutableMap<String, String> = HashMap()
constructor(context: Context?) : super(context) {
init()
}
constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs) {
init()
}
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : super(
context,
attrs,
defStyleAttr
) {
init()
}
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
constructor(
context: Context?,
attrs: AttributeSet?,
defStyleAttr: Int,
defStyleRes: Int
) : super(context, attrs, defStyleAttr, defStyleRes) {
init()
}
private fun init() {
inflate(context, R.layout.view_permission, this)
packageManager = context.packageManager
}
fun setPermissionGroupInfo(permissionGroupInfo: PermissionGroupInfo) {
this.permissionGroupInfo = permissionGroupInfo
val imageView = findViewById<ImageView>(R.id.img)
imageView.setImageDrawable(getPermissionGroupIcon(permissionGroupInfo))
//imageView.setColorFilter(getContext().getStyledAttributeColor(imageView.getContext(), android.R.attr.colorAccent));
}
fun addPermission(permissionInfo: PermissionInfo) {
val title = permissionInfo.loadLabel(packageManager)
val description = permissionInfo.loadDescription(packageManager)
permissionMap[getReadableLabel(title.toString(), permissionInfo.packageName)] =
if (description.isNullOrEmpty())
"No description"
else
description.toString()
val permissionLabels: List<String> = ArrayList(permissionMap.keys)
val permissionLabelsView = findViewById<LinearLayout>(R.id.permission_labels)
permissionLabelsView.removeAllViews()
permissionLabels
.filter { it.isNotEmpty() }
.sortedBy { it }
.forEach {
addPermissionLabel(
permissionLabelsView,
it,
permissionMap[it]
)
}
}
private fun addPermissionLabel(
permissionLabelsView: LinearLayout,
label: String,
description: String?
) {
val textView = TextView(context)
textView.text = label
textView.setOnClickListener {
var title: String = permissionGroupInfo.loadLabel(packageManager).toString()
if (title.contains("UNDEFINED")) {
title = "Android"
}
title = title.capitalize(Locale.getDefault())
context.showDialog(title, description)
}
permissionLabelsView.addView(textView)
}
private fun getPermissionGroupIcon(permissionGroupInfo: PermissionGroupInfo?): Drawable? {
return try {
ContextCompat.getDrawable(context, permissionGroupInfo!!.icon)
} catch (e: NotFoundException) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP_MR1)
permissionGroupInfo!!.loadUnbadgedIcon(packageManager)
else
permissionGroupInfo!!.loadIcon(packageManager)
}
}
private fun getReadableLabel(label: String, packageName: String): String {
val prefixes: MutableList<String> = mutableListOf(
"android",
packageName
)
if (label.contains("UNDEFINED")) {
return "Android"
}
prefixes
.map { "$it.permission." }
.forEach {
if (label.startsWith(it)) {
return it.replace(it, "")
.replace("_", " ")
.toLowerCase(Locale.getDefault())
.capitalize(Locale.getDefault())
}
}
return label.capitalize(Locale.getDefault())
}
}

View File

@@ -343,6 +343,7 @@ class AppDetailsActivity : BaseDetailsActivity() {
inflateAppRatingAndReviews(B.layoutDetailsReview, app)
inflateAppDevInfo(B.layoutDetailsDev, app)
inflateAppPrivacy(B.layoutDetailsPrivacy, app)
inflateAppPermission(B.layoutDetailsPermissions, app)
if (!authData.isAnonymous) {
app.testingProgram?.let {

View File

@@ -31,6 +31,10 @@ import androidx.core.text.HtmlCompat
import androidx.lifecycle.ViewModelProvider
import com.airbnb.epoxy.EpoxyRecyclerView
import com.aurora.Constants
import com.aurora.extensions.hide
import com.aurora.extensions.load
import com.aurora.extensions.show
import com.aurora.extensions.toast
import com.aurora.gplayapi.data.models.*
import com.aurora.gplayapi.helpers.AppDetailsHelper
import com.aurora.gplayapi.helpers.ReviewsHelper
@@ -43,10 +47,6 @@ import com.aurora.store.data.providers.AuthProvider
import com.aurora.store.databinding.*
import com.aurora.store.util.CommonUtil
import com.aurora.store.util.NavigationUtil
import com.aurora.extensions.hide
import com.aurora.extensions.load
import com.aurora.extensions.show
import com.aurora.extensions.toast
import com.aurora.store.view.custom.RatingView
import com.aurora.store.view.epoxy.controller.DetailsCarouselController
import com.aurora.store.view.epoxy.controller.GenericCarouselController
@@ -55,6 +55,7 @@ import com.aurora.store.view.epoxy.views.details.ReviewViewModel_
import com.aurora.store.view.epoxy.views.details.ScreenshotView
import com.aurora.store.view.epoxy.views.details.ScreenshotViewModel_
import com.aurora.store.view.ui.commons.BaseActivity
import com.aurora.store.view.ui.sheets.PermissionBottomSheet
import com.aurora.store.viewmodel.details.DetailsClusterViewModel
import nl.komponents.kovenant.task
import nl.komponents.kovenant.ui.failUi
@@ -339,6 +340,14 @@ abstract class BaseDetailsActivity : BaseActivity() {
}
}
fun inflateAppPermission(B: LayoutDetailsPermissionsBinding, app: App) {
B.headerPermission.addClickListener {
PermissionBottomSheet.newInstance(app)
.show(supportFragmentManager, PermissionBottomSheet.TAG)
}
B.txtPermissionCount.text = ("${app.permissions.size} permissions")
}
private fun updateBetaActions(B: LayoutDetailsBetaBinding, isSubscribed: Boolean) {
if (isSubscribed) {
B.btnBetaAction.text = getString(R.string.action_leave)

View File

@@ -0,0 +1,165 @@
/*
* Aurora Store
* Copyright (C) 2019, 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/>.
*
*
*/
package com.aurora.store.view.ui.sheets
import android.content.pm.PackageManager
import android.content.pm.PermissionGroupInfo
import android.content.pm.PermissionInfo
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.LinearLayout
import com.aurora.Constants
import com.aurora.extensions.hide
import com.aurora.extensions.show
import com.aurora.gplayapi.data.models.App
import com.aurora.store.R
import com.aurora.store.databinding.SheetPermissionsBinding
import com.aurora.store.view.custom.layouts.PermissionGroup
import java.util.*
class PermissionBottomSheet : BaseBottomSheet() {
private lateinit var B: SheetPermissionsBinding
private lateinit var app: App
private lateinit var packageManager: PackageManager
companion object {
const val TAG = "PermissionBottomSheet"
@JvmStatic
fun newInstance(
app: App
): PermissionBottomSheet {
return PermissionBottomSheet().apply {
arguments = Bundle().apply {
putString(Constants.STRING_APP, gson.toJson(app))
}
}
}
}
override fun onCreateContentView(
inflater: LayoutInflater,
container: ViewGroup,
savedInstanceState: Bundle?
): View {
B = SheetPermissionsBinding.inflate(inflater)
return B.root
}
override fun onContentViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
val bundle = arguments
bundle?.let {
val rawApp = bundle.getString(Constants.STRING_APP, "{}")
app = gson.fromJson(rawApp, App::class.java)
if (app.packageName.isNotEmpty()) {
inflateData()
} else {
dismissAllowingStateLoss()
}
}
}
private fun inflateData() {
packageManager = requireContext().packageManager
val permissionGroupWidgets: MutableMap<String, PermissionGroup?> =
HashMap<String, PermissionGroup?>()
for (permissionName in app.permissions) {
val permissionInfo = getPermissionInfo(permissionName) ?: continue
val permissionGroupInfo = getPermissionGroupInfo(permissionInfo)
var permissionGroup: PermissionGroup?
if (permissionGroupWidgets.containsKey(permissionGroupInfo.name)) {
permissionGroup = permissionGroupWidgets[permissionGroupInfo.name]
} else {
permissionGroup = PermissionGroup(context)
permissionGroup.setPermissionGroupInfo(permissionGroupInfo)
permissionGroup.layoutParams = LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.WRAP_CONTENT
)
permissionGroupWidgets[permissionGroupInfo.name] = permissionGroup
}
permissionGroup?.addPermission(permissionInfo)
}
B.permissionsContainer.removeAllViews()
val permissionGroupLabels: List<String> = ArrayList(permissionGroupWidgets.keys)
permissionGroupLabels.sortedBy { it }.forEach {
B.permissionsContainer.addView(permissionGroupWidgets[it])
}
if (permissionGroupLabels.isEmpty())
B.permissionsNone.show()
else
B.permissionsNone.hide()
}
private fun getPermissionInfo(permissionName: String): PermissionInfo? {
return try {
packageManager.getPermissionInfo(permissionName, 0)
} catch (e: PackageManager.NameNotFoundException) {
null
}
}
private fun getPermissionGroupInfo(permissionInfo: PermissionInfo): PermissionGroupInfo {
val permissionGroupInfo: PermissionGroupInfo = if (null == permissionInfo.group) {
getFakePermissionGroupInfo(permissionInfo.packageName)
} else {
try {
packageManager.getPermissionGroupInfo(permissionInfo.group!!, 0)
} catch (e: PackageManager.NameNotFoundException) {
getFakePermissionGroupInfo(permissionInfo.packageName)
}
}
if (permissionGroupInfo.icon == 0) {
permissionGroupInfo.icon = R.drawable.ic_permission_android
}
return permissionGroupInfo
}
private fun getFakePermissionGroupInfo(packageName: String): PermissionGroupInfo {
val permissionGroupInfo = PermissionGroupInfo()
when (packageName) {
"android" -> {
permissionGroupInfo.icon = R.drawable.ic_permission_android
permissionGroupInfo.name = "android"
}
"com.google.android.gsf", "com.android.vending" -> {
permissionGroupInfo.icon = R.drawable.ic_permission_google
permissionGroupInfo.name = "google"
}
else -> {
permissionGroupInfo.icon = R.drawable.ic_permission_unknown
permissionGroupInfo.name = "unknown"
}
}
return permissionGroupInfo
}
}

View File

@@ -0,0 +1,29 @@
<!--
~ Aurora Store
~ Copyright (C) 2019, 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/>.
~
~
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="?android:colorForeground"
android:pathData="M6,18c0,0.55 0.45,1 1,1h1v3.5c0,0.83 0.67,1.5 1.5,1.5s1.5,-0.67 1.5,-1.5L11,19h2v3.5c0,0.83 0.67,1.5 1.5,1.5s1.5,-0.67 1.5,-1.5L16,19h1c0.55,0 1,-0.45 1,-1L18,8L6,8v10zM3.5,8C2.67,8 2,8.67 2,9.5v7c0,0.83 0.67,1.5 1.5,1.5S5,17.33 5,16.5v-7C5,8.67 4.33,8 3.5,8zM20.5,8c-0.83,0 -1.5,0.67 -1.5,1.5v7c0,0.83 0.67,1.5 1.5,1.5s1.5,-0.67 1.5,-1.5v-7c0,-0.83 -0.67,-1.5 -1.5,-1.5zM15.53,2.16l1.3,-1.3c0.2,-0.2 0.2,-0.51 0,-0.71 -0.2,-0.2 -0.51,-0.2 -0.71,0l-1.48,1.48C13.85,1.23 12.95,1 12,1c-0.96,0 -1.86,0.23 -2.66,0.63L7.85,0.15c-0.2,-0.2 -0.51,-0.2 -0.71,0 -0.2,0.2 -0.2,0.51 0,0.71l1.31,1.31C6.97,3.26 6,5.01 6,7h12c0,-1.99 -0.97,-3.75 -2.47,-4.84zM10,5L9,5L9,4h1v1zM15,5h-1L14,4h1v1z" />
</vector>

View File

@@ -0,0 +1,29 @@
<!--
~ Aurora Store
~ Copyright (C) 2019, 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/>.
~
~
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="?android:colorForeground"
android:pathData="M21.35,11.1H12.18V13.83H18.69C18.36,17.64 15.19,19.27 12.19,19.27C8.36,19.27 5,16.25 5,12C5,7.9 8.2,4.73 12.2,4.73C15.29,4.73 17.1,6.7 17.1,6.7L19,4.72C19,4.72 16.56,2 12.1,2C6.42,2 2.03,6.8 2.03,12C2.03,17.05 6.16,22 12.25,22C17.6,22 21.5,18.33 21.5,12.91C21.5,11.76 21.35,11.1 21.35,11.1V11.1Z" />
</vector>

View File

@@ -0,0 +1,29 @@
<!--
~ Aurora Store
~ Copyright (C) 2019, 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/>.
~
~
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="54.1866"
android:viewportHeight="40.64">
<path
android:fillColor="?android:colorForeground"
android:pathData="M29.9,26.57l-4.39,0c-0.01,-0.63 -0.02,-1.02 -0.02,-1.16 0,-1.42 0.24,-2.59 0.71,-3.51 0.47,-0.92 1.42,-1.95 2.83,-3.1 1.41,-1.15 2.26,-1.9 2.53,-2.26 0.43,-0.56 0.64,-1.18 0.64,-1.86 0,-0.94 -0.38,-1.75 -1.13,-2.42 -0.75,-0.67 -1.76,-1.01 -3.04,-1.01 -1.23,0 -2.26,0.35 -3.09,1.05 -0.82,0.7 -1.39,1.77 -1.71,3.2l-4.44,-0.55c0.12,-2.06 1,-3.8 2.62,-5.24 1.63,-1.43 3.76,-2.15 6.4,-2.15 2.78,0 4.99,0.73 6.63,2.18 1.64,1.45 2.46,3.14 2.46,5.07 0,1.06 -0.31,2.08 -0.91,3.03 -0.61,0.95 -1.89,2.25 -3.87,3.89 -1.02,0.85 -1.66,1.53 -1.9,2.05 -0.25,0.52 -0.36,1.44 -0.34,2.78zM25.51,33.08l0,-4.84 4.84,0 0,4.84 -4.84,0z" />
</vector>

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>

View File

@@ -150,11 +150,13 @@
<string name="details_no_app">"No apps available"</string>
<string name="details_no_dependencies">"No Dependencies"</string>
<string name="details_no_previews">"No previews available"</string>
<string name="details_no_permission">"No permissions"</string>
<string name="details_no_reviews">"No reviews available"</string>
<string name="details_no_updates">"No updates available"</string>
<string name="details_no_whitelist">"No apps whitelisted"</string>
<string name="details_others_think">"See what others think about this app"</string>
<string name="details_paid">"Paid"</string>
<string name="details_permission">"Permission"</string>
<string name="details_privacy">"Privacy"</string>
<string name="details_rate_stars_first">"Enter star rating first"</string>
<string name="details_rate_this_app">"Rate this app"</string>