欧美大屁股bbbbxxxx,狼人大香伊蕉国产www亚洲,男ji大巴进入女人的视频小说,男人把ji大巴放进女人免费视频,免费情侣作爱视频

歡迎來到入門教程網(wǎng)!

Android

當前位置:主頁 > 軟件編程 > Android >

Android仿微信QQ聊天頂起輸入法不頂起標題欄的問題

來源:本站原創(chuàng)|時間:2020-01-10|欄目:Android|點擊: 次

在這記錄一下輸入法彈出的一系列問題,有的輸入法彈出就把整個布局彈上去,有的輸入法彈出布局不會有變化,有的輸入法彈出遮蓋輸入框等等問題,網(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)載,煩請注明出處,謝謝!

網(wǎng)頁制作CMS教程網(wǎng)絡(luò)編程軟件編程腳本語言數(shù)據(jù)庫服務(wù)器

如果侵犯了您的權(quán)利,請與我們聯(lián)系,我們將在24小時內(nèi)進行處理、任何非本站因素導致的法律后果,本站均不負任何責任。

聯(lián)系QQ:835971066 | 郵箱:835971066#qq.com(#換成@)

Copyright © 2002-2020 腳本教程網(wǎng) 版權(quán)所有