反应原生TouchableOpacity onPress在某些Android设备上不起作用

时间:2020-09-06 11:19:19

标签: reactjs react-native touchableopacity

我在登录屏幕上有本机反应。登录按钮在某些屏幕上不起作用。请检查下面的代码

<TouchableOpacity style={{
        width: 136,
        marginTop: responsiveHeight(5),
        borderRadius: 8,
        height: 50,
        backgroundColor: '#0178f2',
        justifyContent: 'center',
    }}
    disabled={loading ? true : false}
    onPress={() => {
        this._login(this.props.navigation);
    }}
>
    {loading ? (
        <ActivityIndicator size="large" color={'white'} />
    ) : (
        <Text
        uppercase={false}
        style={{
            fontFamily: 'product',
            color: 'white',
            alignSelf: 'center',
            fontSize: responsiveFontSize(1.5),
        }}>
        Login
        </Text>
    )}
</TouchableOpacity>

0 个答案:

没有答案