【发布时间】:2016-08-19 05:50:57
【问题描述】:
我有一个列表项的布局。在该布局列表项中,我有一个输入类型为数字的编辑文本。
我的问题是当我点击编辑文本时,键盘会闪烁正常的字母数字键盘和数字键。
我不知道为什么会这样。
Layout.xml
<EditText
android:id="@+id/edit_quantity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/total"
android:layout_centerHorizontal="true"
android:background="@color/bg_white"
android:gravity="center"
android:inputType="number"
android:maxLength="4"
android:maxLines="1"
android:minWidth="@dimen/view_cart_count_min_width"
android:paddingLeft="@dimen/padding_normal"
android:paddingRight="@dimen/padding_normal"
android:textSize="@dimen/text_medium" />
Manifest.xml
<activity
android:name="com.manoramaonline.entedeal.MyCartActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize|stateVisible" >
</activity>
当我将 softInputMode 更改为 adJustPan 时,键盘 flickirinf 停止,但屏幕没有调整大小。所以键盘是在布局上来的。
当 android:windowSoftInputMode 调整 resize 时编辑文本输入类型号时键盘闪烁
我有什么解决方案可以在打开软键盘时减小屏幕尺寸。
【问题讨论】:
-
您找到解决方案了吗?
-
@Binil Surendran 你找到解决方案了吗
标签: android android-layout keyboard android-edittext