QuickPermissions / QuickPermissions-Kotlin

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

Positive Button & Negative Button all white color #8

Closed asdfghj1237890 closed 5 years ago

asdfghj1237890 commented 5 years ago

Hi, i am using this library recently and i found that when i just using this from the readme

fun methodWithPermissions() = runWithPermissions(Manifest.permission.CAMERA,Manifest.permission.RECORD_AUDIO) { Toast.makeText(this, "Camera and audio recording permissions granted", Toast.LENGTH_SHORT).show(); }

buttons all are white color text.

Screenshot as below: https://imgur.com/a/f9Q7I6w

kirtan403 commented 5 years ago

Can you please provide the following details?

Device Manufacturer: ROM Name (Stock, MIUI etc) : ROM Version (if any): Android Version:

asdfghj1237890 commented 5 years ago

Can you please provide the following details?

Device Manufacturer: ROM Name (Stock, MIUI etc) : ROM Version (if any): Android Version:

with the android studio emulator below Pixel 2 XL Android 8.0 API 26

m4limo commented 5 years ago

@asdfghj1237890 maybe it is just a styling issue?

try to style the alertDialog accordingly:

<style name="AlertDialogTheme" parent="Theme.AppCompat.Light.Dialog.Alert">
    <item name="buttonBarNegativeButtonStyle">@style/NegativeButtonStyle</item>
    <item name="buttonBarPositiveButtonStyle">@style/PositiveButtonStyle</item>
</style>

<style name="NegativeButtonStyle" parent="Widget.AppCompat.Button.ButtonBar.AlertDialog">
    <item name="android:textColor">#f00</item>
</style>

<style name="PositiveButtonStyle" parent="Widget.AppCompat.Button.ButtonBar.AlertDialog">
    <item name="android:textColor">#00f</item>
</style>

and use <item name="alertDialogTheme">@style/AlertDialogTheme</item> in your AppTheme

kirtan403 commented 5 years ago

@asdfghj1237890 Hi, is your issue fixed, now?

kirtan403 commented 5 years ago

Maybe your accent color is white? The same issue has happened with me also. Try to apply an alert dialog theme with overridden colorAccent can also solve this issue.