1
我想創建佈局,包括從圖像和幾EditTexts正常情況下所顯示的下一個圖像中
Android的調整佈局的一部分時,軟鍵盤顯示
但是,當用戶開始輸入文字我這裏顯示的
我該怎麼辦呢
軟鍵盤在屏幕的底部,
EditTexts這件事,但是圖像的尺寸根據軟鍵盤的大小:需要改變佈局的下一個呢? 在此先感謝
我想創建佈局,包括從圖像和幾EditTexts正常情況下所顯示的下一個圖像中
Android的調整佈局的一部分時,軟鍵盤顯示
但是,當用戶開始輸入文字我這裏顯示的
我該怎麼辦呢
軟鍵盤在屏幕的底部,
EditTexts這件事,但是圖像的尺寸根據軟鍵盤的大小:需要改變佈局的下一個呢? 在此先感謝
試試這個代碼
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
還設置
android:windowSoftInputMode="adjustResize"
物業你的活動在AndroidManifest.xml
把它們放在一個滾動型,並確保在您添加清單「adjustResize」用於相應的活動。 –
但我不需要滾動,我需要適合整個屏幕的佈局 –