Android: Hiding view elements when Keypad comes up - android

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

Related

Android | How to hide BottomNavigation even if windowSoftInputMode is set to 'adjustResize'?

I have an activity with BottomNavigation. If the user needs to click on the submit button soft keyboard hides it. Then he again needs to press the back button to see the submit button. In this case, I used windowSoftInputMode='adjustResize' so that the screen gets resized automatically and the user can scroll up and click on the submit button.
But, I have BottomNavigation too, windowSoftInputMode='adjustResize' makes BottomNavigation float above the soft keyboard. Can anyone suggest a better solution? Any help will be appreciated. Thanks
Thats tricky issue... You have two options in here:
Keep 'adjustResize' and hide BottomNavigation view when keyboard pops up (e.g. simply setVisiblity?)
Change to e.g. 'adjustPan' (or any other) preventing keyboard resizing app and add bottom padding with height of keyboard for whole content container. BottomNavigation will stay hidden under keyboard, but padding will allow scrolling to Submit button
In both cases you need to detect open/close keyboard, in second case you will also need keyboard height measuring. IN HERE and HERE you have big SO topics about this case, check out answers and comments, and pick proper resolution for your purposes

Android 4.4 Soft Keyboard is empty

I'm trying to make my android app backwards compatible, from targetSDK=21 to minSDK=19. My app has webviews. When an input field in the webview is focused, the keyboard comes up, but nothing is displayed but the background color in place of the keyboard. But something is definitely there; when I press the space where the keyboard should be, keys are being pressed (ie. letters get entered into the input field), but I just can't see them. Also, the keyboard space covers up the webview so I know that something is there. Any ideas on what's going on?
EDIT: Here's a link to a screenshot. The bottom grayish area is where the invisible keyboard is. If I press on this area, keys do get pressed but the actual keyboard is not visible.
https://www.dropbox.com/s/4pbfj6gey2h6dyc/Screenshot_2015-09-17-12-50-22.png?dl=0

PhoneGap + Android page doesn't refresh after soft keyboard closes

Most of the time (but not always), when I finish typing in a or and the soft keyboard hides, the view area is left raised with a black space on the bottom. Clicking, tilting or otherwise engaging the phone corrects the screen. However, user's first motion is usually pressing , but if you click submit it jumps down and you actually just click on the text area again. How do you stop this and get the screen to reset after the keyboard closes.
Take a look at you AndroidManifest.xml
http://developer.android.com/guide/topics/manifest/activity-element.html
I think you need to change android:configChanges.
I have the exact same problem what i did was handle hidekeyboard even in javascript and do something like window.scrollTo(0,0) or $("input[type=text],textarea").blur();
This will cause the the screen to get back to normal position
But there is just one problem when click from input field of type = text to a input field password it internally hide the keyboard which causes the hidekeyboard event to fire and scrolls the screen to top. This is the only side effect of this
Let me know if you find the solution for this

EditText.setError() popup placement

I'm using the v16 API and having problems with where the popup is being placed when the onscreen keyboard is displayed.
The first problem is that if the EditText is at the bottom of the screen, when I touch the field to open it for editing the popup is displayed below the control and the immediately covered as the keyboard appears. It doesn't reposition itself above the EditText until a keypress triggers my validation code to fire again on the new value.
The second problem is that when I close the keyboard and the ScrollView containing the text scrolls back down from where it positioned itself to show the EditText above the keyboard the popup remains placed on the upper half of the screen instead of where the EditText is until I touch something else on the screen (triggering the ScrollView to do a redraw???).
Unfortunately that popup has various problems like this :(
Perhaps a simple solution in your case is to forcibly invalidate the UI when the keyboard has displayed and dismissed? Can't recall if the Popup will reposition if the EditText is invalidated, but worth trying as the alternative may be to re-implement.
Checkout my android-formidable-validation lib on github, it re-implements...though has its own problems - if you go down that path, why not give me a hand with some contributions ;)

Android keyboard hides itself, showing blank space below, after coming back from screensaver

I am working on an android app and really enjoying it too. But today, I got stuck on a small problem with soft keyboard.
I have an EditText at the bottom of the screen and when user clicks on it a keyboard pops up ,resizing the entire view to show the EditText above keyboard, which is as it should be. But if user doesn't do anything for sometime, phone sleeps and screen gets locked with the keyboard still present in the screen. When phone comes back after sleep, the keyboard seems to hide itself, leaving my views in a resized state. A blank space is shown where the keyboard has been present..I would be happy if
The keyboard remains there after
coming back from sleep..
Let the keyboard hide,but my views
should go back to original size, ie
without any blank space..
What can I do to achieve any of these?

Categories

Resources