Android仿微信QQ聊天頂起輸入法不頂起標題欄的問題
在這記錄一下輸入法彈出的一系列問題,有的輸入法彈出就把整個布局彈上去,有的輸入法彈出布局不會有變化,有的輸入法彈出遮蓋輸入框等等問題,網(wǎng)上也有很多說加著加那的,但是看一下都不是很完整,解決不了所有問題,我在這歸納一下大家拿去用吧!
*****先看看做好的效果圖*****
一:AndroidManifest.xml里面對應的activity設(shè)置
android:windowSoftInputMode="adjustResize"
二:在activity的xml根布局設(shè)置
android:fitsSystemWindows="true"
三:為了listview聊天列表的效果,在listview設(shè)置
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="輸入聊天內(nèi)容" 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="發(fā)送" android:textColor="@color/zhucolor" android:textSize="14dp" /> </RelativeLayout> </RelativeLayout>
總結(jié)
以上所述是小編給大家介紹的Android仿微信QQ聊天頂起輸入法不頂起標題欄的問題,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對我們網(wǎng)站的支持!
如果你覺得本文對你有幫助,歡迎轉(zhuǎn)載,煩請注明出處,謝謝!
上一篇:Android自定義View之RadioGroup實現(xiàn)跨多行顯示
欄 目:Android
下一篇:Android基于騰訊云實時音視頻仿微信視頻通話最小化懸浮
本文標題:Android仿微信QQ聊天頂起輸入法不頂起標題欄的問題
本文地址:http://mengdiqiu.com.cn/a1/Android/9088.html
您可能感興趣的文章
- 01-10Android自定義View之繪制圓形頭像功能
- 01-10Android實現(xiàn)雙擊返回鍵退出應用實現(xiàn)方法詳解
- 01-10android實現(xiàn)記住用戶名和密碼以及自動登錄
- 01-10android實現(xiàn)簡單計算器功能
- 01-10Android 友盟第三方登錄與分享的實現(xiàn)代碼
- 01-10android實現(xiàn)指紋識別功能
- 01-10Emoji表情在Android JNI中的兼容性問題詳解
- 01-10Android實現(xiàn)圓形漸變加載進度條
- 01-10android開發(fā)環(huán)境中SDK文件夾下的所需內(nèi)容詳解
- 01-10android異步消息機制 源碼層面徹底解析(1)


閱讀排行
本欄相關(guān)
- 01-10Android自定義View之繪制圓形頭像功能
- 01-10Android實現(xiàn)雙擊返回鍵退出應用實現(xiàn)方
- 01-10android實現(xiàn)簡單計算器功能
- 01-10android實現(xiàn)記住用戶名和密碼以及自動
- 01-10C++自定義API函數(shù)實現(xiàn)大數(shù)相乘算法
- 01-10Android 友盟第三方登錄與分享的實現(xiàn)代
- 01-10android實現(xiàn)指紋識別功能
- 01-10如何給Flutter界面切換實現(xiàn)點特效
- 01-10Android實現(xiàn)圓形漸變加載進度條
- 01-10Emoji表情在Android JNI中的兼容性問題詳
隨機閱讀
- 01-10SublimeText編譯C開發(fā)環(huán)境設(shè)置
- 01-10C#中split用法實例總結(jié)
- 01-11Mac OSX 打開原生自帶讀寫NTFS功能(圖文
- 08-05DEDE織夢data目錄下的sessions文件夾有什
- 04-02jquery與jsp,用jquery
- 01-11ajax實現(xiàn)頁面的局部加載
- 01-10delphi制作wav文件的方法
- 01-10使用C語言求解撲克牌的順子及n個骰子
- 08-05織夢dedecms什么時候用欄目交叉功能?
- 08-05dedecms(織夢)副欄目數(shù)量限制代碼修改