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

Android:如何避免在調用鍵盤時推送布局

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

問題描述

我的布局如下

<?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>

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

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
您應該在您的活動標簽中添加清單 android:windowSoftInputMode="adjustResize" 參數.

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.

正確的標志是:android:windowSoftInputMode="adjustResize"

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

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

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

相關文檔推薦

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 操作標簽的多行 EditText)
How to detect the swipe left or Right in Android?(如何在 Android 中檢測向左或向右滑動?)
Prevent dialog dismissal on screen rotation in Android(防止在Android中的屏幕旋轉對話框解除)
How do I handle ImeOptions#39; done button click?(如何處理 ImeOptions 的完成按鈕點擊?)
How do you set EditText to only accept numeric values in Android?(您如何將 EditText 設置為僅接受 Android 中的數值?)
主站蜘蛛池模板: 国产精品一区二区三区久久久 | 欧美日产国产成人免费图片 | 少妇诱惑av | 久久综合色综合 | 中文字幕日韩欧美一区二区三区 | 久久久久久久久久久久久九 | 日韩久久久久 | 日韩国产黄色片 | 日韩欧美国产精品一区二区三区 | 亚洲视频在线观看免费 | 91人人澡人人爽 | 成人久久 | 精品综合在线 | 日本手机看片 | 99精品久久久 | 欧美黄色免费网站 | 青青草国产在线观看 | 午夜精品久久久久久久99黑人 | 老牛影视av一区二区在线观看 | 国产一区二区三区免费观看视频 | 欧美成人在线网站 | 欧美精品一二三区 | 365夜爽爽欧美性午夜免费视频 | 精品日韩一区二区三区 | 国产99热在线 | 日韩在线欧美 | 久久99深爱久久99精品 | 五月婷六月丁香 | 丁香婷婷综合激情五月色 | 日韩在线免费视频 | 91av视频在线免费观看 | 久久久久久蜜桃一区二区 | 中文字幕1区 | 99精品福利视频 | av中文字幕在线 | 日韩久久久久久 | 国产日韩一区二区三区 | 91在线观看网址 | 婷婷桃色网 | 精国产品一区二区三区 | 91精品国产综合久久精品 |