Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Action sheet text gets cut-off #298

Open
bradzickafoose opened this issue Mar 27, 2023 · 4 comments
Open

[Android] Action sheet text gets cut-off #298

bradzickafoose opened this issue Mar 27, 2023 · 4 comments

Comments

@bradzickafoose
Copy link

bradzickafoose commented Mar 27, 2023

Action sheet text gets cut-off on Android devices and can be replicated in the example project.

You can see the issue here:
Screenshot_20230327-103506
(Screenshot is from a Google Pixel 4a, Android 13)

Until a better solution exists, one hacky solution is to add a space to the end of the text.

@LegendEffects
Copy link

Bump, had a similar issue reported from a Samsung A22 running Android 13 where the "l" from cancel is cut off.

@StuartCallan
Copy link

I also had this issue reported by a user. After doing some digging, I found that the trigger to reproduce this is to set "Bold text" option to true in "Display size and text" in Accessibility settings.

Can also confirm that @bradzickafoose workaround to add a space to the end of the option text works.

@bradbyte
Copy link
Collaborator

@StuartCallan thanks for the update! For a real fix, perhaps we need to add some padding to the container? Has anyone replicated it running the action sheet locally and able to fix without adding the space? Thanks!

@wcgray
Copy link

wcgray commented Oct 15, 2023

For me, this worked as a workaround:

showActionSheetWithOptions({
    options: options,
    cancelButtonIndex: options.length - 1,
    textStyle: Platform.OS === 'android' ? {  
        minWidth: Dimensions.get('window').width * 0.9,
    } : undefined,
}, (selectedIndex: number) => {
    // do something...
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants