user1886887
user1886887

Reputation: 51

Android soft keyboard issue

Hi friends,

I am working on an android application. I have a small issue with android soft keyboard. I have an editText and when i click on it, it shows me android soft keyboard. On the top of the soft keyboard, there is a text area that displays all the text i type using soft keyboard.It displays me what ever text i type using the keyboard. Is there a option to hide that text area on keyboard.

Kindly help me in this issue.

Thanks in advance.

Upvotes: 2

Views: 574

Answers (3)

Nipun Gogia
Nipun Gogia

Reputation: 1856

you can also use EditText.setInputType(InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD); in your code.With the following code,one can stop the suggestions coming automatically from soft keyboard when you click on EditText

Upvotes: 0

Sahil Mahajan Mj
Sahil Mahajan Mj

Reputation: 11141

I think you are talking about Auto Suggestion. Add the following code to your edit text in the layout file.

android:inputType="textNoSuggestions"  

or in the code, you can use it like this,

setInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);

also you'd better read this

Upvotes: 2

gezdy
gezdy

Reputation: 3322

Solution if you speak about auto-focus on edittext:

InputMethodManager imm = (InputMethodManager)mContext.getSystemService(Context.INPUT_METHOD_SERVICE);
                    imm.hideSoftInputFromWindow(editText.getWindowToken(), 0);

Upvotes: 0

Related Questions