react-native-actionsheet icon indicating copy to clipboard operation
react-native-actionsheet copied to clipboard

styles in actionsheet not effect in android

Open adirzoari opened this issue 7 years ago • 6 comments

I'm trying to change style in actionsheet but it not effect at all

          <ActionSheet
                        ref={o => this.ActionSheet = o}
                        options={options}
                        cancelButtonIndex={2}
                        onPress={(index) => { this._imagePick(index) }}
                        styles={{messageBox: { height: 60 },body:{backgroundColor:'red'}}}
                        />

the backgroundcolor style stay white

adirzoari avatar Jul 02 '18 08:07 adirzoari

same here I try to add the border and nothing happens

radjivF avatar Jul 23 '18 07:07 radjivF

@befee Same here.. When can we expect this to get fixed.

harish-coditas avatar Jul 23 '18 13:07 harish-coditas

As a workaround, you can copy the entire styles from: https://github.com/beefe/react-native-actionsheet/blob/master/lib/styles.js and customize it by your needs

rtrufin avatar Oct 20 '18 14:10 rtrufin

actionsheet styles are working fine, you have to target right element of stylesheet. for example if you want to change background color target body

body: { backgroundColor: '#e5e5e5' },

follow link mentioned by @rtrufin above to see which element to target while customising styles for action sheet

iabdulazeem avatar Dec 18 '18 20:12 iabdulazeem

I faced the same issue but then i noticed that i was not importing the action sheet correctly. Make sure you import it like:

import {ActionSheetCustom as ActionSheet} from 'react-native-actionsheet';

Above worked for me.

TayyabaAslam3317 avatar Aug 04 '20 07:08 TayyabaAslam3317

@TayyabaAslam3317 by using import {ActionSheetCustom as ActionSheet} from 'react-native-actionsheet';

My application got stuck while opening the actionsheet most of the times, any help?

RamanDEEP225 avatar Oct 14 '22 05:10 RamanDEEP225