|
1 | 1 | import React, { Component, PropTypes } from 'react'; |
2 | 2 | import { StyleSheet, Text, View, Animated, |
3 | | - TouchableNativeFeedback, TouchableWithoutFeedback, Dimensions } from 'react-native'; |
| 3 | + TouchableNativeFeedback, TouchableWithoutFeedback, Dimensions, Platform } from 'react-native'; |
4 | 4 | import { shadowStyle, alignItemsMap, Touchable, isAndroid } from './shared'; |
5 | 5 |
|
6 | 6 | const { width: WIDTH } = Dimensions.get('window'); |
@@ -58,7 +58,7 @@ export default class ActionButtonItem extends Component { |
58 | 58 | return ( |
59 | 59 | <Animated.View pointerEvents="box-none" style={animatedViewStyle}> |
60 | 60 | <Touchable |
61 | | - background={isAndroid && TouchableNativeFeedback.Ripple('rgba(255,255,255,0.75)')} |
| 61 | + background={isAndroid && (Platform['Version'] >= 21) ? TouchableNativeFeedback.Ripple('rgba(255,255,255,0.75)') : TouchableNativeFeedback.SelectableBackground()} |
62 | 62 | activeOpacity={this.props.activeOpacity || 0.85} |
63 | 63 | onPress={this.props.onPress}> |
64 | 64 | <View |
@@ -89,7 +89,7 @@ export default class ActionButtonItem extends Component { |
89 | 89 |
|
90 | 90 | return ( |
91 | 91 | <TextTouchable |
92 | | - background={isAndroid && TouchableNativeFeedback.Ripple(this.props.buttonColor)} |
| 92 | + background={isAndroid && (Platform['Version'] >= 21) ? TouchableNativeFeedback.Ripple('rgba(255,255,255,0.75)') : TouchableNativeFeedback.SelectableBackground()} |
93 | 93 | activeOpacity={this.props.activeOpacity || 0.85} |
94 | 94 | onPress={this.props.onPress}> |
95 | 95 | <View style={textStyles}> |
|
0 commit comments