久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Android - 軟鍵盤將我的活動布局推到屏幕外

Android - Soft Keyboard pushes layout of my activity out of screen(Android - 軟鍵盤將我的活動布局推到屏幕外)
本文介紹了Android - 軟鍵盤將我的活動布局推到屏幕外的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

我的activity的布局如下圖.

My activity's layout is as shown below.

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent"
   android:orientation="vertical">

   <FrameLayout android:id="@+id/title_bar"
      android:layout_width="fill_parent"
      android:layout_height="25dip"
      android:background="@drawable/bg_title" />

   <LinearLayout android:id="@+id/main"
      android:width="fill_parent"
      android:layout_height="fill_parent"
      android:layout_weight="1">
         <ListView android:id="@+id/android:list"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent" />
         <TextView android:id="@+id/android:empty"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent" />
      </FrameLayout>
   </LinearLayout>

   <LinearLayout
      android:layout_width="fill_parent"
      android:layout_height="50dip" >
      <EditText android:id="@+id/query"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content" 
         android:hint="Enter some search terms"
         android:singleLine="true" 
         android:layout_weight="1" />
      <Button android:id="@+id/btn_hide"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:background="@drawable/btn_hide"
         android:layout_marginLeft="6dip" />
   </LinearLayout>
 </LinearLayout>

因此,搜索框固定在屏幕底部.

So, the search box is fixed to the bottom of the screen.

但是,當用戶單擊 EditText 時,軟鍵盤會出現并將布局推出屏幕之外,搜索框除外.

But, when user clicks the EditText, Soft Keyboard shows up and pushes the layout out of the screen except the search box.

我剛剛開始使用 Android,所以我在這里做錯了嗎??

I'm just starting out with Android, so am I doing anything wrong here??

推薦答案

嘗試在 Manifest 中為您的活動添加以下內容:

Try adding the following for your activity in Manifest:

android:windowSoftInputMode="adjustPan"

這篇關于Android - 軟鍵盤將我的活動布局推到屏幕外的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Cut, copy, paste in android(在android中剪切、復制、粘貼)
android EditText blends into background(android EditText 融入背景)
Change Line Color of EditText - Android(更改 EditText 的線條顏色 - Android)
EditText showing numbers with 2 decimals at all times(EditText 始終顯示帶 2 位小數的數字)
Changing where cursor starts in an expanded EditText(更改光標在展開的 EditText 中的開始位置)
EditText, adjustPan, ScrollView issue in android(android中的EditText,adjustPan,ScrollView問題)
主站蜘蛛池模板: 国产精品美女久久久久久久久久久 | 亚洲综合三区 | 日韩欧美在线视频 | 日韩精品一区二区三区 | 国产高清自拍视频在线观看 | 久久亚洲一区二区三区四区 | 91电影在线播放 | 日本亚洲精品成人欧美一区 | 中文字幕不卡在线观看 | 黄网免费 | 日本精品一区二区三区在线观看 | 久久美女网 | 中文字幕精品一区二区三区在线 | 99精品福利视频 | 手机av在线 | 麻豆国产一区二区三区四区 | 精品欧美黑人一区二区三区 | 欧洲一区在线观看 | 日韩喷潮| 亚洲一区欧美 | 国产精品xxxx| 亚洲精品一区二三区不卡 | 激情a| 久久国产日韩欧美 | 亚洲精品福利视频 | 亚洲精品自在在线观看 | 国产麻豆乱码精品一区二区三区 | 国产乱码精品一区二区三区中文 | 人人干视频在线 | 全部免费毛片在线播放网站 | 中文在线a在线 | 在线国产小视频 | 久久国产亚洲精品 | 午夜欧美| 国产精品久久久久久久久免费高清 | 色精品| jav成人av免费播放 | 亚洲一区二区三区在线 | 99爱国产| 欧美日韩在线观看视频 | 成人欧美一区二区 |