0

Although I am pretty sure this is doable, I just wanted to double check with you all. I need to hide certain UI elements(like checkbox, lables etc) on the screen when User taps on the edittext field, just before Keypad comes up and take up half the screen. Same should be visible once Keypad is removed from the screen. I am thinking of using View.GONEon those UI elements, but I am not sure how to get them back once the Keypad is removed from the screen. I want you help in knowing if this is possible, if so how can revert it when Keypad is no more on the screen.

Thanks, SKU

sku
  • 607
  • 1
  • 8
  • 26
  • `VIEW.INVISIBLE` maybe. How are you planning on listening for the users' touch event? – Ryan Smith Aug 29 '13 at 22:49
  • OnClick Listener on the field should help me do that. But my problem is to know when the Keypad is removed out of the screen to make the elements visible. – sku Aug 29 '13 at 22:57
  • So [here](http://illusionsandroid.blogspot.com/2011/09/android-soft-virtual-keyboard-listener.html) is one way some guy made a listener for the keyboard, but someone had some complaints about it. [This](http://stackoverflow.com/questions/4312319/howto-capture-the-virtual-keyboard-show-hide-event-in-android) is a similar question that might be useful. Hopefully some of this helps. – Ryan Smith Aug 29 '13 at 23:04
  • You may try to implement in onFocusChange() of the EditText. This has a boolean parameter which indicates in or out of focus. You can then show/hide the elements with View.VISIBLE / View.GONE – sjdutta Aug 29 '13 at 23:04

0 Answers0