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

Android:如何避免在調(diào)用鍵盤時推送布局

Android: How to avoid layout being pushed when keyboard invoked(Android:如何避免在調(diào)用鍵盤時推送布局)
本文介紹了Android:如何避免在調(diào)用鍵盤時推送布局的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我的布局如下

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:weightSum="1">
<TextView  
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="@string/hello"
    />
<LinearLayout android:id="@+id/linearLayout1" android:layout_width="match_parent" android:layout_height="wrap_content">
    <Button android:text="Button" android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button>
    <Button android:text="Button" android:id="@+id/button2" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button>
    <Button android:text="Button" android:id="@+id/button3" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button>
    <Button android:text="Button" android:id="@+id/button4" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button>
    <Button android:text="Button" android:id="@+id/button5" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button>
</LinearLayout>
<ImageButton android:id="@+id/imageButton1" android:src="@android:drawable/stat_notify_sync_noanim" android:layout_height="fill_parent" android:layout_weight="1" android:layout_width="fill_parent"></ImageButton>
<EditText android:id="@+id/editText1" android:layout_height="wrap_content" android:layout_width="match_parent">
    <requestFocus></requestFocus>
</EditText>
</LinearLayout>

當(dāng)通過單擊編輯文本調(diào)用軟鍵盤時,整個布局被推送.我可以保持標(biāo)題上的按鈕固定并讓圖像視圖被推送嗎?因為按鈕會像導(dǎo)航欄一樣,所以即使布局被向上推,它也應(yīng)該在那里.

when the softkeyboard invoked by clicking on the edit text the whole layou is being pushed. Can i keep the buttons on the header fixed and let the imageview being pushed?? Because buttons are gonna act like navigation bar so it should be there even when the layout is being pushed up.

之前

之后

推薦答案

在此處閱讀文章:http://android-developers.blogspot.com/2009/04/updating-applications-for-on-screen.html
您應(yīng)該在您的活動標(biāo)簽中添加清單 android:windowSoftInputMode="adjustResize" 參數(shù).

Read article here: http://android-developers.blogspot.com/2009/04/updating-applications-for-on-screen.html
You should add in manifest android:windowSoftInputMode="adjustResize" parameter to your activity tag.

正確的標(biāo)志是:android:windowSoftInputMode="adjustResize"

EDITED: Proper flag is: android:windowSoftInputMode="adjustResize"

這篇關(guān)于Android:如何避免在調(diào)用鍵盤時推送布局的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

相關(guān)文檔推薦

EditText: Disable Paste/Replace menu pop-up on Text Selection Handler click event(EditText:禁用文本選擇處理程序單擊事件上的粘貼/替換菜單彈出)
Multiline EditText with Done SoftInput Action Label on 2.3(2.3 上帶有完成 SoftInput 操作標(biāo)簽的多行 EditText)
How to detect the swipe left or Right in Android?(如何在 Android 中檢測向左或向右滑動?)
Prevent dialog dismissal on screen rotation in Android(防止在Android中的屏幕旋轉(zhuǎn)對話框解除)
How do I handle ImeOptions#39; done button click?(如何處理 ImeOptions 的完成按鈕點擊?)
How do you set EditText to only accept numeric values in Android?(您如何將 EditText 設(shè)置為僅接受 Android 中的數(shù)值?)
主站蜘蛛池模板: 中文字幕在线人 | 日韩在线观看网站 | 久久精品一区二区视频 | 欧美精品一区在线 | 欧美伊人久久久久久久久影院 | 色播久久 | 91精品一区 | 精品人伦一区二区三区蜜桃网站 | 国内精品久久久久久 | 国产高清视频一区 | 麻豆视频在线免费观看 | 91精品中文字幕一区二区三区 | 国产一级精品毛片 | 亚洲成av人片在线观看 | 美女在线视频一区二区三区 | 色视频网站在线观看 | 欧美日韩精品在线一区 | av资源中文在线天堂 | 黄色一级免费观看 | 91精品在线看 | 色欧美综合 | 日韩精品一区二区三区四区 | 中文字幕一区二区三区在线观看 | 欧美三区视频 | 国产一区二区三区视频 | 国产精品成人品 | 狠狠亚洲| 精品久久久久一区二区国产 | 亚洲iv一区二区三区 | 久久久久久久一区二区三区 | 国产一区二区三区视频 | 亚洲国产精品久久人人爱 | 麻豆av片| 久久久久久91| 91传媒在线观看 | 精品福利一区二区三区 | 久久精品视频一区二区三区 | 国产精品精品视频 | 中文字幕男人的天堂 | 亚洲欧美日韩中文字幕一区二区三区 | 91中文在线观看 |