android标题栏不被顶上去,Android仿微信QQ聊天顶起输入法不顶起标题栏的问题

在这记录一下输入法弹出的一系列问题,有的输入法弹出就把整个布局弹上去,有的输入法弹出布局不会有变化,有的输入法弹出遮盖输入框等等问题,网上也有很多说加着加那的,但是看一下都不是很完整,解决不了所有问题,我在这归纳一下大家拿去用吧!

*****先看看做好的效果图*****

89649d92eaf7dcba86a9eb7cf7259851.png

一:AndroidManifest.xml里面对应的activity设置

android:windowSoftInputMode="adjustResize"

二:在activity的xml根布局设置

android:fitsSystemWindows="true"

三:为了listview聊天列表的效果,在listview设置

android:transcriptMode="normal"

四:最后粘贴一下每个用到的地方代码

1:AndroidManifest.xml

android:name=".activity.ChatRoom"

android:screenOrientation="portrait"

android:windowSoftInputMode="adjustResize"/>

2:activity的xml根布局和listview

android:layout_width="match_parent"

android:layout_height="match_parent"

android:background="@color/xmlback"

android:fitsSystemWindows="true">

android:id="@+id/include"

layout="@layout/titlelayout" />

android:id="@+id/listview"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:layout_above="@+id/botton"

android:layout_below="@+id/include"

android:background="@color/xmlback"

android:divider="@null"

android:scrollbars="none"

android:transcriptMode="normal">

android:id="@+id/botton"

android:layout_width="match_parent"

android:layout_height="70dp"

android:layout_alignParentBottom="true"

android:background="@drawable/hlistvbackwl1">

android:layout_width="match_parent"

android:layout_height="50dp"

android:layout_centerVertical="true"

android:layout_marginLeft="10dp"

android:layout_toLeftOf="@+id/textsend"

android:background="@drawable/ltback">

android:id="@+id/edittext"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:layout_marginLeft="10dp"

android:background="@null"

android:hint="输入聊天内容"

android:textSize="14dp" />

android:id="@+id/textsend"

android:layout_width="50dp"

android:layout_height="50dp"

android:layout_alignParentRight="true"

android:layout_centerVertical="true"

android:gravity="center"

android:text="发送"

android:textColor="@color/zhucolor"

android:textSize="14dp" />

总结

以上所述是小编给大家介绍的Android仿微信QQ聊天顶起输入法不顶起标题栏的问题,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对脚本之家网站的支持!

如果你觉得本文对你有帮助,欢迎转载,烦请注明出处,谢谢!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值