picker icon indicating copy to clipboard operation
picker copied to clipboard

Set backgroundColor on Android's dialog

Open AlexandreMouyen opened this issue 4 years ago • 8 comments
trafficstars

Hello there,

Is there a way to change Android's dialog backgroundColor ?

I already tried tons of styles, nothing is working...

Thanks a lot.

AlexandreMouyen avatar May 21 '21 15:05 AlexandreMouyen

It worked with style prop (backgroundColor) up to version 1.11. It got changed (but not documented?) in version 1.12. See here: https://github.com/react-native-picker/picker/blob/5a4ba06be462f834fcd6e26ad3098b3e2528bcb6/js/PickerAndroid.android.js#L170 Use prop backgroundColor (not in style, but its own prop). Unfortunaltely, TS types and documentation were not updated to reflect this change. This works:

<Picker ... backgroundColor="blue">...</Picker>

but TypeScript will not recognize it.

janrozic avatar Jun 18 '21 08:06 janrozic

This didn't work for me @janrozic

afonso-tsx avatar Jul 16 '21 14:07 afonso-tsx

This didn't work dialog background for me too @janrozic & @afonsopbarros Screen Shot 2021-07-29 at 7 55 46 PM

minhtet-BeeComTech avatar Jul 29 '21 13:07 minhtet-BeeComTech

Does anyone have solutions yet?

dunkbing avatar Oct 02 '21 15:10 dunkbing

really? This library dont support backgroundColor?

LucasHimelfarb avatar Jan 26 '22 14:01 LucasHimelfarb

I am also facing the same issue. Wanted to have White colour background Dialog box for Dark theme Android and Not able to do that.

vijaykumariorbit avatar Jun 29 '23 12:06 vijaykumariorbit

Any news on that?

I tried styling, background only apply to items, giving a white space on top and bottom.

softov avatar Oct 24 '23 20:10 softov

Wanted to have White colour background Dialog box for Dark theme Android and Not able to do that.

I want to have a dark dialog box for dark theme on Android and I can't do that... How's that for irony?

Nantris avatar Dec 14 '23 03:12 Nantris