Facing difficulties using keypad in android 4.0.3?

232 views Asked by At

I have been working on an app screen which include a edittext of numeric type input. It works fine normally , what happens is that --when user touch the editetxt a numeric keypad opens which takes whole screen and as user press next in the keypad , this keypad closes and a new keypad which takes half screen pops up.

I don't know how to listen to keypad next button .

What I really want is that how can I disable one of the keypad.? The code I am using is simple edittext:

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

    </EditText>

Please help me I am new to this? I prefer to disable the first keypad?

1

There are 1 answers

0
Navdroid On BEST ANSWER

Ok I got the answer Myself This code snips made my day:

    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); 
                  }