react-native-action-sheet
react-native-action-sheet copied to clipboard
[Android] Action sheet text gets cut-off
Action sheet text gets cut-off on Android devices and can be replicated in the example project.
You can see the issue here:
(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.
Bump, had a similar issue reported from a Samsung A22 running Android 13 where the "l" from cancel is cut off.
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.
@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!
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...
});