javascript - TouchableOpacity Button 在实时设备上不起作用
问题描述
我在聊天页面底部有以下设置:
<View styleName="inner-keyboard">
<TextInput
value={this.state.text}
onChangeText={this.handleChange}
numberOfLines={3}
placeholder="Message..."
styleName="textareainput"
name="msginput"
multiline={true}
contextMenuHidden={true}
caretHidden={true}
disableFullscreenUI={true}
/>
<TouchableOpacity
onPress={this.onSend}
onPressIn={this.onSend} delayPressIn={0}
style={{ height: 100, width: 300, zIndex: 999 }}
hitSlop={{ top: 25, left: 25, right: 25, bottom: 25 }}
>
<Text styleName="sendbutton">Send</Text>
</TouchableOpacity>
</View>
在 iOS 模拟器上,它工作正常。
但是,当我尝试在实际设备上使用它时,它不会。
我的风格似乎也不是特别疯狂:
.sendbutton {
color: #536dfe;
font-weight: bold;
font-size: 15;
width: 15%;
margin-left: 1rem;
}
.inner-keyboard {
flex-direction: row;
}
.inner-keyboard {
background-color: #fff;
width: 90%;
height: 40;
border-color: #C7C7CC;
border-style: solid;
border-right-width: 2;
border-left-width: 2;
border-top-width: 2;
border-bottom-width: 2;
margin: 0 auto;
padding-top: 5;
padding-bottom: 5;
border-radius: 50px;
}
.textareainput {
width: 75%;
border-radius: 5px;
background-color: #fff;
margin-left: 5;
font-size: 12;
max-height: 70;
min-height: 20;
}
该按钮清晰可见,但由于某种原因,我根本无法在实际设备上选择它。
解决方案
推荐阅读
- javascript - 正则表达式(太多?)很多情况
- powershell - 通过切片现有的arraylist创建Arraylist的Arraylist
- angular - 如何在生产中访问 Angular 应用程序
- latex - 在投影仪和 \pause 中的同一张幻灯片上参考
- javascript - 无法使用 JQUERY 嵌套 div 元素
- python-3.x - dropna() 在给定阈值的情况下不适用于轴 = 1
- algorithm - 了解大 O 复杂性
- python - 在python中读取html中特定范围的行
- html - 如何拥有一个整体包含带有 href 的链接
- ruby-on-rails - Rails 控制器没有获得特定的参数