react-native-action-sheet icon indicating copy to clipboard operation
react-native-action-sheet copied to clipboard

[Android] Action sheet text gets cut-off

Open bradzickafoose opened this issue 1 year ago • 5 comments

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.

bradzickafoose avatar Mar 27 '23 14:03 bradzickafoose

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

LegendEffects avatar Apr 24 '23 16:04 LegendEffects

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 avatar Jul 19 '23 08:07 StuartCallan

@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!

bradbyte avatar Jul 20 '23 14:07 bradbyte

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...
});

wcgray avatar Oct 15 '23 18:10 wcgray