我的清單文件中試圖獲得的LinearLayout的滾動型何時調整時,閱讀解決此問題多次討論和它與android:windowSoftInputMode="stateHidden|adjustResize"
做的(以及adjustPan)顯示鍵盤。Android的滾動型,在操作欄上Softkeyboard
我有具有包含10個的LinearLayout部分(的TextView/EditText上視圖)滾動型的內部的的LinearLayout的佈局。我想盡我已閱讀並不管如何,當鍵盤被打開,點擊頂部的EditText的結果,認爲調整組合(平移),使得前場是行動吧檯後面。我可以滾動到頁面的底部,但我無法到達頂部EditText - 我只能滾動到第二個。我可以嘗試拉下來,我可以開始看到頂部的EditText,但不能得到它顯示,除非我取消鍵盤(這顯然我不能編輯的文本,然後)。
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.example.myproject.FirstActivity"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/scrollView"
tools:showIn="@layout/activity_work"
android:layout_gravity="center_horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="x1"
android:layout_weight="50"/>
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:ems="10"
android:id="@+id/work_one"
android:hint="0"
android:gravity="right"
android:selectAllOnFocus="true"
android:textAlignment="gravity"
android:layout_weight="50" />
</LinearLayout>
.
. (9 more of these)
.
</LinearLayout>
</ScrollView>
UPDATE:
所以我嘗試:機器人:windowSoftInputMode = 「adjustResize」 和/或機器人:windowSoftInputMode = 「adjustPan」 和軟鍵盤移位操作欄下的頂部字段。
想法?
嘿,我面臨同樣的問題。你有沒有解決這個問題? –