Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/208.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在android 4.0.3中使用键盘面临困难?_Android_Android Keypad_Keypad_Numeric Keypad - Fatal编程技术网

在android 4.0.3中使用键盘面临困难?

在android 4.0.3中使用键盘面临困难?,android,android-keypad,keypad,numeric-keypad,Android,Android Keypad,Keypad,Numeric Keypad,我一直在开发一个应用程序屏幕,其中包含一个数字类型输入的edittext。它正常工作,发生的情况是——当用户触摸EditText时,一个数字键盘打开,占据整个屏幕,当用户按下键盘上的next时,这个键盘关闭,一个占据半屏幕的新键盘弹出 我不知道怎么听键盘上的“下一步”按钮 我真正想要的是如何禁用其中一个键盘。? 我使用的代码是简单的edittext: <EditText android:id="@+id/teedittext" android:

我一直在开发一个应用程序屏幕,其中包含一个数字类型输入的edittext。它正常工作,发生的情况是——当用户触摸EditText时,一个数字键盘打开,占据整个屏幕,当用户按下键盘上的next时,这个键盘关闭,一个占据半屏幕的新键盘弹出

我不知道怎么听键盘上的“下一步”按钮

我真正想要的是如何禁用其中一个键盘。? 我使用的代码是简单的edittext:

       <EditText
        android:id="@+id/teedittext"
        android:layout_width="85dip"
        android:layout_height="wrap_content"
        android:numeric="integer" >

    </EditText>


请帮帮我,我是新手?我更喜欢禁用第一个键盘?

好的,我自己得到了答案,这段代码剪了我的一天:

    teedittext.setOnFocusChangeListener(new EditText.OnFocusChangeListener() {

       @Override
        public void onFocusChange(View v, boolean hasFocus) {
                // TODO Auto-generated method stub
                InputMethodManager imm =(InputMethodManager) getSystemService(                                  INPUT_METHOD_SERVICE);
                        imm.hideSoftInputFromWindow(((EditText)findViewById(v.getId())).getWindowToken(), 0); 
                  }

好的,我自己得到了答案这个代码剪让我很开心:

    teedittext.setOnFocusChangeListener(new EditText.OnFocusChangeListener() {

       @Override
        public void onFocusChange(View v, boolean hasFocus) {
                // TODO Auto-generated method stub
                InputMethodManager imm =(InputMethodManager) getSystemService(                                  INPUT_METHOD_SERVICE);
                        imm.hideSoftInputFromWindow(((EditText)findViewById(v.getId())).getWindowToken(), 0); 
                  }

不能理解你的问题?现在你可以理解了!!不能理解你的问题?现在你可以理解了!!