【发布时间】:2026-01-07 14:00:01
【问题描述】:
我已经实现了带有输入项的浮动标签。以下是我的代码并附上屏幕截图。浮动标签在 iphone 中工作正常,但在 android 中,浮动标签在使用 react native 时触及底部边框
<Item floatingLabel style={styles.floatInput}>
<Label style={styles.lbl}>Enter Your Mobile Number</Label>
<Input
style={styles.inputcolor}
ref="Mobile"
keyboardType="numeric"
onChangeText={text => {
this.checkSetMobile(text)
}}
value={this.state.Mobile}
/>
<Icon style={{color:AppColors.colors.main_color}} name="md-call" />
</Item>
lbl: {
paddingTop: Platform.OS === "ios" ? undefined : 5 ,
paddingBottom: Platform.OS === "ios" ? undefined : 5 ,
marginBottom: 5,
},
inputcolor: {
flex: 1,
paddingBottom:5,
}
【问题讨论】:
标签: android react-native floating