-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Description

I have wrapped the toolbar from the above picture in ViewOverlfow and got the modal to properly display. However, the modal is only touchable within the area of the toolbar (red rectangular), and not touchable in the blue rectangular area. Is it possible to make the entire modal touchable?
Toolbar's render method:
render() {
return (
<ViewOverflow
style={styles.container}>
{this._renderAIAction()}
...
{this._renderAutocompleteSelectionActions()}
{this._renderAlignModal()}
</ViewOverflow>
);
}
modal's render method:
_renderAlignModal = () => {
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
if (this.state.isAlignModalVisible) {
return (
<TouchableWithoutFeedback
onPress={() => this.setState({isAlignModalVisible: false})}>
<View style={styles.modalBackground}>
<View style={[styles.modalContainer, {
left: this.state.alignActionButtonLayout.x,
bottom: this.state.alignActionButtonLayout.y + this.state.alignActionButtonLayout.height / 2
}]}>
{this._renderAction(actions.alignLeft)}
{this._renderAction(actions.alignCenter)}
{this._renderAction(actions.alignRight)}
{this._renderAction(actions.alignFull)}
</View>
</View>
</TouchableWithoutFeedback>
)
}
}
styles:
const styles = StyleSheet.create({
container: {
height: TOOL_BAR_HEIGHT,
backgroundColor: "#F7F7F7",
borderTopColor: "#CCCCCC",
borderTopWidth: 0.5,
flexDirection: 'row',
justifyContent: 'space-around',
alignItems: 'center',
},
modalBackground: {
position: 'absolute',
height: Dimensions.get('window').height,
bottom: 0,
left: 0,
right: 0,
},
modalContainer: {
width: TOOL_BAR_HEIGHT,
paddingVertical: MARGIN_1,
position: 'absolute',
backgroundColor: COLOR_MATERIAL_LIGHT_1,
alignItems: 'center',
shadowColor: COLOR_MATERIAL_LIGHT_5,
borderRadius: 2,
shadowRadius: 6,
shadowOpacity: 0.8,
elevation: 6,
},
}
n1stre, ethanyuwang, kevinNejad, Kisepro, vovanmozg and 9 more
Metadata
Metadata
Assignees
Labels
No labels