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

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

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

問題描述

限時送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 時,軟鍵盤會出現(xiàn)并將布局推出屏幕之外,搜索框除外.

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 中為您的活動添加以下內(nèi)容:

Try adding the following for your activity in Manifest:

android:windowSoftInputMode="adjustPan"

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

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

相關(guān)文檔推薦

Cut, copy, paste in android(在android中剪切、復(fù)制、粘貼)
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 位小數(shù)的數(shù)字)
Changing where cursor starts in an expanded EditText(更改光標在展開的 EditText 中的開始位置)
EditText, adjustPan, ScrollView issue in android(android中的EditText,adjustPan,ScrollView問題)
主站蜘蛛池模板: 亚洲人成网站777色婷婷 | 日韩精品一区二区三区在线播放 | 婷婷成人在线 | 色免费看 | 成人在线观看免费 | 一区二区国产精品 | 亚洲一区二区三区在线播放 | 亚洲一区二区精品视频 | 国产乱一区二区三区视频 | h小视频| 欧美v免费 | 久久久久久久久99精品 | 国产高清精品在线 | 午夜精品一区二区三区三上悠亚 | 成人精品一区二区三区中文字幕 | 操皮视频 | 亚州国产 | www.操com| 亚洲高清视频在线观看 | 久草视频在线播放 | 福利视频三区 | 婷婷在线免费 | 黄色网址在线免费观看 | 国产精彩视频 | 久久lu| 欧美极品一区二区 | 四虎国产 | 亚洲男人的天堂网站 | 中文字幕在线一区 | 国产视频在线一区二区 | 午夜在线观看免费 | 国产极品粉嫩美女呻吟在线看人 | 日韩福利| 日韩电影在线一区 | 一级大黄 | 日韩一区二区在线观看 | 最新日韩精品 | 狠狠躁天天躁夜夜躁婷婷老牛影视 | 日韩毛片| 成人区精品一区二区婷婷 | 一个色在线 |