QuickPermissions / QuickPermissions-Kotlin

The most easiest way to handle Android Runtime Permissions in Kotlin
Apache License 2.0
313 stars 35 forks source link

Allow to customize the strings of the dialog buttons #23

Open Joseph-Gayed opened 3 years ago

Joseph-Gayed commented 3 years ago

I'm working in an app which supports Arabic language interface and I want to change the strings of the dialog action buttons that are displayed whenever a dialog is shown.

It's currently hard-coded in the com.livinglifetechway.quickpermissions_kotlin.util.PermissionCheckerFragment:

activity?.alert { message = quickPermissionsRequest?.rationaleMessage.orEmpty() positiveButton("TRY AGAIN") { requestPermissionsFromUser() } negativeButton("CANCEL") { clean() } }?.apply { isCancelable = false }?.show()

Suggestion : can we support the strings of negativeButton and positiveButton in the QuickPermissionsRequest?