Android仿微信QQ聊天顶起输入法不顶起标题栏的问题
在这记录一下输入法弹出的一系列问题,有的输入法弹出就把整个布局弹上去,有的输入法弹出布局不会有变化,有的输入法弹出遮盖输入框等等问题,网上也有很多说加着加那的,但是看一下都不是很完整,解决不了所有问题,我在这归纳一下大家拿去用吧!
*****先看看做好的效果图*****
一:AndroidManifest.xml里面对应的activity设置
android:windowSoftInputMode="adjustResize"
二:在activity的xml根布局设置
android:fitsSystemWindows="true"
三:为了listview聊天列表的效果,在listview设置
android:transcriptMode="normal"
四:最后粘贴一下每个用到的地方代码
1:AndroidManifest.xml
<!--聊天室--> <activity android:name=".activity.ChatRoom" android:screenOrientation="portrait" android:windowSoftInputMode="adjustResize"/>
2:activity的xml根布局和listview
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/xmlback" android:fitsSystemWindows="true"> <include android:id="@+id/include" layout="@layout/titlelayout" /> <ListView 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"></ListView> <RelativeLayout android:id="@+id/botton" android:layout_width="match_parent" android:layout_height="70dp" android:layout_alignParentBottom="true" android:background="@drawable/hlistvbackwl1"> <RelativeLayout 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"> <EditText 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" /> </RelativeLayout> <TextView 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" /> </RelativeLayout> </RelativeLayout>
总结
以上所述是小编给大家介绍的Android仿微信QQ聊天顶起输入法不顶起标题栏的问题,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对我们网站的支持!
如果你觉得本文对你有帮助,欢迎转载,烦请注明出处,谢谢!
上一篇:Android自定义View之RadioGroup实现跨多行显示
栏 目:Android
下一篇:Android基于腾讯云实时音视频仿微信视频通话最小化悬浮
本文标题:Android仿微信QQ聊天顶起输入法不顶起标题栏的问题
本文地址:https://www.xiuzhanwang.com/a1/Android/9088.html
您可能感兴趣的文章
- 01-10Android自定义View之绘制圆形头像功能
- 01-10Android实现双击返回键退出应用实现方法详解
- 01-10android实现记住用户名和密码以及自动登录
- 01-10android实现简单计算器功能
- 01-10Android 友盟第三方登录与分享的实现代码
- 01-10android实现指纹识别功能
- 01-10Emoji表情在Android JNI中的兼容性问题详解
- 01-10Android实现圆形渐变加载进度条
- 01-10android开发环境中SDK文件夹下的所需内容详解
- 01-10android异步消息机制 源码层面彻底解析(1)
阅读排行
本栏相关
- 01-10Android自定义View之绘制圆形头像功能
- 01-10Android实现双击返回键退出应用实现方
- 01-10android实现简单计算器功能
- 01-10android实现记住用户名和密码以及自动
- 01-10C++自定义API函数实现大数相乘算法
- 01-10Android 友盟第三方登录与分享的实现代
- 01-10android实现指纹识别功能
- 01-10如何给Flutter界面切换实现点特效
- 01-10Android实现圆形渐变加载进度条
- 01-10Emoji表情在Android JNI中的兼容性问题详
随机阅读
- 01-10SublimeText编译C开发环境设置
- 01-10C#中split用法实例总结
- 01-11Mac OSX 打开原生自带读写NTFS功能(图文
- 08-05DEDE织梦data目录下的sessions文件夹有什
- 04-02jquery与jsp,用jquery
- 01-11ajax实现页面的局部加载
- 01-10delphi制作wav文件的方法
- 01-10使用C语言求解扑克牌的顺子及n个骰子
- 08-05织梦dedecms什么时候用栏目交叉功能?
- 08-05dedecms(织梦)副栏目数量限制代码修改