Question

I'm new to android and I need to set a EditText to use soft keyboard input only. It should not display any text that I type using the hard keyboard.is this possible ?

Update: I use the hard keyboard input to track key events using onKeyDown method in Activity class and perform a separate task, problem comes when a EditText field is focused, it displays what ever the key I pressed using the hard keyboard. I need to avoid this and let only soft keyboard inputs into a particular EditText field and use the hard keyboard input to a different task.

Was it helpful?

Solution

According to your need, you can set keyboard settings in Android Manifest File.

<uses-configuration android:reqFiveWayNav=["true" | "false"] 
            android:reqHardKeyboard=["true" | "false"]
            android:reqKeyboardType=["undefined" | "nokeys" | "qwerty" |  
                                     "twelvekey"]
            android:reqNavigation=["undefined" | "nonav" | "dpad" | 
                                   "trackball" | "wheel"]
            android:reqTouchScreen=["undefined" | "notouch" | "stylus" | 
                                    "finger"] />
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top