您的位置:首页 > 移动开发 > Android开发

当用软键盘输入时输入框被键盘遮挡的问题

2011-04-19 16:17 381 查看
解决方案:

在我们的LinearLayout布局外添加ScrollView 

 

示例:

 

由原来的:

 

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">

......

</LinearLayout>
 

改为:

 

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">

......

</LinearLayout>
</ScrollView>


 

2011-04-19

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  android layout encoding