2016-08-19 69 views
4

我有一个列表项目的布局。在该布局列表项目中,我有一个输入类型为编号的编辑文本。Android:当EditText输入类型为编号时,键盘闪烁

我的问题是当我点击编辑文本键盘闪烁与正常的字母数字键盘和数字键。

我不明白为什么会发生这种情况。

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是停止

,但屏幕不调整。所以键盘就会出现在布局上。

当机器人:windowSoftInputMode是调整与编辑文本输入型数字调整当时的键盘闪烁

我有没有减少屏幕尺寸时,软键盘是开放的任何解决方案。

回答

-1

机器人:windowSoftInputMode = “stateVisible | adjustPan”

使用本

+0

没有工作,其使用alignParentButtom在键盘softInputMode –

+0

我面临着类似的问题上不显示我的按钮,但只能在荣誉设备。任何解决方案? – Avijeet

0

我有一个类似的问题。我有一个列表适配器内的编辑文本。在ExitText的xml中,我有 android:inputType =“numberDecimal”。

在manifest文件中,我曾经为活动的行: 机器人:windowSoftInputMode =“stateHidden | adjustNothing” 当我会选择一个编辑框,它只是显示的数字小键盘(并停止所有的颠簸)。

我就捡起从问题28674967.