ハマったので、備忘録として書いておきます。
位置が固定されたボタンを作りたくて、positionが'absolute'のViewを含むTouchableOpacityを作ろうとしましたが、andoridの実機で動作を確認した結果、タッチしても反応しませんでした。
<TouchableOpacity onPress={() => Alert.alert('add')}>
<View style={styles.localButtom}></View>
</TouchableOpacity>
const styles = StyleSheet.create({
localButtom: {
alignItems: 'center',
justifyContent: 'center',
position: 'absolute',
zIndex:9999,
bottom: 16,
right: 16,
width: 56,
height: 56,
borderRadius: 28,
elevation: 3,
backgroundColor: '#FFF',
}});
githubにissueは挙げられているが、まだ解決されていない様子。
https://github.com/facebook/react-native/issues/27232
TouchableWithoutFeedbackを使ったら実機で反応したので、そちらを使うことにしました。