NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

Excess space on Android ActionSheet

Open joshuahenson opened this issue 8 years ago • 4 comments

react-native, react and native-base version

"native-base": "2.4.1",
"react": "16.2.0",
"react-native": "0.52.0"

Expected behaviour

Hide empty space when there is no title, like on ios, or similar to the Google app screenshot_20180526-163959

Actual behaviour

Extra whitespace where title goes screenshot_20180526-163908

Steps to reproduce (code snippet or screenshot)

Remove title from ActionSheet ActionSheet.show( { options: BUTTONS, cancelButtonIndex: CANCEL_INDEX, destructiveButtonIndex: DESTRUCTIVE_INDEX }, buttonIndex => { this.setState({ clicked: BUTTONS[buttonIndex] }); } )}

Is the bug present in both ios and android or in any one of them?

Android only

I haven't tested this but I was thinking maybe we could only show the title field if it exists. Something along the lines of {this.state.title && <Text style={{ color: "#757575" }}>{this.state.title}</Text>}

joshuahenson avatar May 27 '18 00:05 joshuahenson

@joshuahenson can you check this https://github.com/listenzz/react-native-modal-translucent

akhil-ga avatar May 28 '18 07:05 akhil-ga

Sorry, I don't think I was clear. I'm talking about the empty space on top of the ActionSheet that is left when you do not include an ActionSheet title. I've colored it yellow and black here.

yellow

My initial hope at quickly glancing at the code was that we could just conditionally not include the Text component if there was no title but I don't think that will make much difference.

joshuahenson avatar May 28 '18 19:05 joshuahenson

Fixed with 2.5.0

SupriyaKalghatgi avatar Jun 08 '18 13:06 SupriyaKalghatgi

Same error on the last version.

TxusBlack avatar May 06 '19 02:05 TxusBlack