Android输入框被键盘遮挡
16lz
2021-01-23
解决方案:
在我们的LinearLayout布局外添加ScrollView
示例:
由原来的:
view plain print ?- <?xmlversion="1.0"encoding="utf-8"?>
- <LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
- ......
- </LinearLayout>
改为:
view plain print ?
- <?xmlversion="1.0"encoding="utf-8"?>
- <ScrollViewxmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
- <LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
- ......
- </LinearLayout>
- </ScrollView>
更多相关文章
- 为TabLayout设置自定义布局
- android动态布局方法总结
- Android——布局的一些动态设置
- Android动态添加布局
- 解决Android Studio XML布局格式化无法换行的问题
- Android ApiDemos示例解析(94):Text->Marquee