Newbie
Newbie

Reputation: 9

There are two keyboards appear when press on an Edit text

I am trying on a view as below:

Result: When I press on edit text, then there 2 keyboards which appear in order.

Upvotes: 0

Views: 1108

Answers (2)

Mohsin kazi
Mohsin kazi

Reputation: 530

what did you mean? on Single edit text two keyboard appear or two different keyboard appears on two edit text.

Note: I checked your app it show only number keyboard cause in edit text,<android:inputType="number"/>

Here Code which you need

 editText.setOnKeyListener(new View.OnKeyListener() {
        @Override
        public boolean onKey(View v, int keyCode, KeyEvent event) {

            if(keyCode==KeyEvent.KEYCODE_ENTER)
            {
                return true;
            }
            return false;
        }
    });

just add to your Activity.java

Upvotes: 1

Rahul Kushwaha
Rahul Kushwaha

Reputation: 6722

At first time ,when activity lunch add this line in AndroidManifest file to hide keyboard.

        android:windowSoftInputMode="stateHidden"
        android:configChanges="orientation|screenSize|keyboardHidden"

And add this line in EditText Property.

 android:imeOptions="actionDone"

This will hide your keyboard and only show when you click on EditText of Particuler Type as input type is Number in your xml. Hope this will help you.

Upvotes: 0

Related Questions