1

I am using the FlipperView to create a wizard like process flow through my application. Within my Activity I inflate the various Views for each page of the flipper and add them in onCreate().

My problem is that some of the pages contain EditText widgets and others contain none. If I leave the default IMF behaviour, the user is expected to touch into the EditText to show the keyboard. The problem then, is when they go to the next screen (without any EditText), the keyboard remains and must be manually hidden. Ideally it should be hidden again.

I have tried various calls to showSoftInput() or toggleSoftInput() but have not yet achieved the desired effect of automatically showing the keyboard when a page is shown with an EditText, and hiding when there is none.

Is this possible? I thought of calling showSoftInput() for each View added to my FlipperView where I want the keyboard shown, but this is not having the desired effect. Do I really have to call showSoftInput() for every EditText on my page (there could be 5-6)?

Have I missed something obvious here? If so sorry, I think I have got myself so confused with this InputMethodManager.

RedBlueThing
  • 39,658
  • 17
  • 95
  • 121
Brad
  • 467
  • 1
  • 4
  • 12

0 Answers0