My app has an EditText that, when I click in it to enter text in the Emulator, brings up a soft keyboard. I don’t want this confounded thing to begin with, but then, like the visiting loud-mouthed uncle in the plaid pants, doesn’t want to go away, and it is blocking the button beneath it. How do I either (a) prorgrammatically prevent the soft keyboard from appearing or at least (b) evict it, albeit manually, when it pops up?
Share
Provided that the user is not supposed to input text, but is able to click the
EditTextand then add text in some other way, you could change theEditTextto aTextViewand then apply the following three tags to it in the layout file:This will make it look like an
EditText, but behave like aTextView.Since you want the user to be able to write stuff in the
EditTextthere are in my opinion two solutions:Buttonyou say dissapears in aScrollView. TheScrollViewwill then wrap its content to allow theButtonto be shown in between the keyboard and theScrollView.