大神们,这个布局怎么让软键盘不把布局顶上去啊

wubincsdn 2015-09-01 05:43:06
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#eeeeee">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:text="欢迎您提交使用意见或者建议"
android:textColor="#2f2f2f"
android:textSize="16sp"/>

<EditText
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="在这里输入您你想说的话!"
android:textSize="16sp"
android:gravity="left|top"
android:textColorHint="#d8d8d8"
android:textColor="#49515c"
android:padding="16dp"
android:lines="6"
android:background="@android:color/white"/>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:text="留下您的联系方式"
android:textColor="#2f2f2f"
android:textSize="16sp"/>

<EditText
android:id="@+id/contact"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="请输入QQ号/手机号码/邮箱"
android:textColor="#49515c"
android:textSize="16sp"
android:textColorHint="#d8d8d8"
android:padding="16dp"
android:background="@android:color/white"/>

<Button
android:id="@+id/submit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="提交"
android:textColor="@android:color/white"
android:textSize="16sp"
android:layout_margin="16dp"
android:background="@drawable/background_style_3"/>

</LinearLayout>
...全文
1906 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
magege2015 2016-11-26
  • 打赏
  • 举报
回复
android:windowSoftInputMode="adjustPan"
Mingyueyixi 2016-10-21
  • 打赏
  • 举报
回复
想要不被顶飞。需要写死布局。比如固定到底部,固定到中央等等
qq_32035969 2016-10-20
  • 打赏
  • 举报
回复
小撇儿1992 2015-09-02
  • 打赏
  • 举报
回复
android:windowSoftInputMode="stateVisible|adjustResize"
=10_01= 2015-09-02
  • 打赏
  • 举报
回复
引用 4 楼 qq411633267 的回复:
android:windowSoftInputMode="stateVisible|adjustResize"
貌似 adjustResize 不会将布局顶上去。
人心向暖 2015-09-01
  • 打赏
  • 举报
回复
去掉stateHidden
人心向暖 2015-09-01
  • 打赏
  • 举报
回复
只要这个吧android:windowSoftInputMode="adjustPan|stateHidden"
wubincsdn 2015-09-01
  • 打赏
  • 举报
回复
我加android:windowSoftInputMode="adjustPan|stateHidden"到对应的配置文件的Activity中并没有什么效果

80,351

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧