首页 > 其他 > 详细

React-native 关于键盘遮挡界面问题

时间:2019-10-21 11:19:40      阅读:295      评论:0      收藏:0      [点我收藏+]
//引入 KeyboardAvoidingView 
import { KeyboardAvoidingView } from ‘react-native‘;

//使用 KeyboardAvoidingView 
render(){
    return <KeyboardAvoidingView behavior={‘padding‘} style={{flex: 1}}>
        {/*具体页面内容*/}
    </KeyboardAvoidingView>
}

//android 已经处理 其实只需要处理Ios 就可以了  

但是有个问题 当使用scrollView  时,再其中的元素依旧会被遮挡,需要注意

通常在框架搭建之初就应该添加适配写法

 

React-native 关于键盘遮挡界面问题

原文:https://www.cnblogs.com/web-Rain/p/11712210.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!