I have a problem and I don't find how to fix it.
I have an editText in my view, which is in a scrollView. When I click on it, keyboard shows up, and then I have to scroll to show my editext on my screen.
EDIT: My editText isn't hidden behind my keyboard, because my scrollview is adapted to my view when keyboard shows up. I've set
android:windowSoftInputMode="adjustResize"
in my manifest
I show you with screens of my App.
Thank you very much
I am trying to scroll so that the two editText views and the button are all shown when the keyboard opens up. I have already tried adding softInputMode to the xml (I set it to adjustResize). I am now completely lost on how to do this. Anyone have any ideas?
Before the Keyboard shows up
When the keyboard opens
What I want it to look like
Thank you in advance!
I have an AutoCompleteTextView which displays name. When I scroll the suggestions, the suggestions list will not stay between AutoCompleteTextView and android soft keyboard, sometimes it will move above my AutoCompleteTextView and sometimes it overlaps android soft keyboard. Please help me solve this issue
I have two EditText views and one ImageView. My goal is to hide the ImageView when i am showing the keyboard (When the user have clicked on one of the EditText fields)
Then show the imageView again when the user have unfocused the EditText field or the keyboard is not visible anymore.
I have tried tons of different ways to do this. But nothing really works as intended. Do you guys have any idea how i could achieve this
Have you tried to detect if the keyboard is opened ? How do I Detect if Software Keyboard is Visible on Android Device?
Make debug and when is opened try to hide image . imageview.setvisibility (GONE)
if it does not work you can try to change layout
Make 2 layouts and switch visibility if the keyboard is open /closed
You can add a OnFocusChangeListener to the EditText,when you click the EditText,it will get focus,and then you can hide the ImageView.
<activity android:name="SearchResultsActivity"
android:windowSoftInputMode="adjustPan"/>
adjustPan:
The activity’s main window is not resized to make room for the soft keyboard. Rather, the contents of the window are automatically panned so that the current focus is never obscured by the keyboard and users can always see what they are typing. This is generally less desirable than resizing, because the user may need to close the soft keyboard to get at and interact with obscured parts of the window.
regards! :)
You can do one thing, place UIView-> UIImageView -> UITextfield1-> UITextField2.Handle the UIImageView hiding state in textfield delegates which are Begin and End editing delegate methods
I'm going crazy!!! Please help me. Ths is the problem:
If i have an Activity with an EditText and a ListView the Soft Keyboard is shown when the Activity comes visible.
If i have remove the ListView the Soft Keyboard is no more shown.
I want to perform the first situation (Activity with an EditText and a ListView) with the second behavior (Soft Keyboard hidden).
I have try to hide the Soft Keyboard in onResume() as described in this but it not works.
Please suggest me a workaround to hide the Soft Keyboard. Thank you so much.
P.s. Sorry for my English ;) Hope the problem is clear.
In your onCreate of your activity you will want to add the following:
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);