为什么在按下" ok"数字软键盘中的按钮是否出现了alphanumericsoftkeyboard?

时间:2014-07-27 14:20:31

标签: android android-layout

当我点击EditText数字键盘上传时,键入一些difgits,然后按" ok"出现正常键盘,绑定到没有Edittext。数字键盘应该消失。如何解决这个问题?

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
android:orientation="vertical"
tools:context=".MainActivity">


<TextView
    android:text="@string/short_instruction"
    android:layout_width="wrap_content"
    android:layout_gravity="center_horizontal"
    android:layout_height="wrap_content" />

<EditText
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:inputType="number"
    android:textAlignment="center"
    android:gravity="center"
    android:maxLength="4"
    android:ems="10"
    android:hint="@string/number_vehicle_hint"
    android:id="@+id/somenumber"
    android:layout_gravity="center_horizontal"
    android:layout_marginTop="10dp"/>

<Button
    android:layout_height="wrap_content"
    android:layout_width="match_parent"
    android:onClick="reportButtonPerform"
    android:text="@string/report_button"
    android:layout_marginTop="20dp"/>

<com.google.android.gms.ads.AdView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center_horizontal"
    android:id="@+id/ad_banner"
    android:focusable="false"
    android:layout_marginTop="30dp"
    ads:adUnitId=";)"
    ads:adSize="BANNER" />

0 个答案:

没有答案
相关问题