標籤:cti single 設定 tab parent mod 高度 軟鍵盤 span
給EditText外加一個ScrollView,將高度設定統一,並給ScrollView設定屬性
android:fillViewport="true"。
註:ScrollView只將EditView嵌套在其中即可,不可將其他組件放進來;不可隨意在資訊清單檔中給該activity設定軟鍵盤屬性。若彈出的軟鍵盤遮擋了部分上移的view,可以在資訊清單檔中給activity設定屬性
android:windowSoftInputMode="adjustResize"
一些不必要的屬性不要隨意添加,以免影響實現功能效果。
代碼:
<ScrollView android:layout_width="fill_parent" android:layout_height="44dp" android:fillViewport="true" android:scrollbars="vertical"> <EditText android:id="@+id/et_password" android:layout_width="match_parent" android:layout_height="44dp" android:background="@drawable/edt_bg" android:drawableLeft="@drawable/key" android:drawablePadding="0dp" android:hint="輸入交易密碼" android:editable="true" android:password="true" android:cursorVisible="true" android:paddingLeft="5dp" android:singleLine="true" /> </ScrollView>
Android view顯示在軟鍵盤上方