question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

styles in actionsheet not effect in android

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

4reactions
TayyabaAslam3317commented, Aug 4, 2020

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.

2reactions
iabdulazeemcommented, Dec 18, 2018

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android equivalence of iOS ActionSheet - Stack Overflow
We use BottomSheetDialog to do the same work in Android. Not exactly the same and may require a bit more code to write...
Read more >
Actionsheet's Android "ugly" styling.. need help - Ionic Forum
In the nightly, the actionsheet CSS has a platform specific update for android. It removes the cancel button (I'm ok with that) but...
Read more >
Sheets: bottom - Material Design
Implementing bottom sheet theming · <style name="Theme.App" parent="Theme.MaterialComponents. · <item name="bottomSheetDialogTheme">@style/ThemeOverlay.App.
Read more >
Action sheets - Presentation - Human Interface Guidelines
Use an action sheet — not an alert — to offer choices related to an ... button has an associated style that conveys...
Read more >
Modal - the Draftbit Docs!
Here is an example when the value of Presentation Style is set to pageSheet on iOS preview mode: 1425. The same property has...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found