From 8b614837fd49040666a1f8dfa15bb23ab1da6dac Mon Sep 17 00:00:00 2001 From: Pablo Enrici Date: Thu, 18 Apr 2019 15:04:03 -0300 Subject: [PATCH] Change UI implementation of ChainSelector This is a workaround for an Android issue which prevents visible overflowed elements to receive taps. See https://github.com/facebook/react-native/issues/21455 --- src/components/nav-drawer/ChainSelector.js | 37 +++++++++++++++++----- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/src/components/nav-drawer/ChainSelector.js b/src/components/nav-drawer/ChainSelector.js index 833d667..d90b57d 100644 --- a/src/components/nav-drawer/ChainSelector.js +++ b/src/components/nav-drawer/ChainSelector.js @@ -1,16 +1,24 @@ import { StyleSheet, TouchableOpacity } from 'react-native' import withChainSelectorState from 'metronome-wallet-ui-logic/src/hocs/withChainSelectorState' import PropTypes from 'prop-types' +import theme from 'metronome-wallet-ui-logic/src/theme' import React from 'react' import { DisplayValue, View, Text } from '../common' import CoinIcon from '../icons/CoinIcon' import Caret from '../icons/CaretIcon' +const BORDER_RADIUS = 12 +const ITEM_HEIGHT = 60 + const Item = props => ( + CHAIN @@ -136,13 +157,13 @@ class ChainSelector extends React.Component { } } -const BORDER_RADIUS = 12 - const styles = StyleSheet.create({ container: { - position: 'relative', zIndex: 1 }, + btn: { + height: ITEM_HEIGHT + }, btnFirst: { borderTopRightRadius: BORDER_RADIUS, borderTopLeftRadius: BORDER_RADIUS @@ -153,9 +174,9 @@ const styles = StyleSheet.create({ }, dropdownContainer: { borderRadius: BORDER_RADIUS, - position: 'absolute', - width: '100%', - top: 22 + marginTop: ITEM_HEIGHT * -1, + elevation: 16, + width: '100%' } })