0

Problem:

I have an edittext as a password field in a viewholderin a recyclerview. If the user clicks on it, the keyboard will appear below it.

edittext password field with textview hidden by keyboard

Below the password field is a textview that gives feedback if the password the user has entered is valid. But this textview is not visible, because it is hidden because of the softkeyboard. Only after closing the softkeyboard, it is visible and he will see if the password he entered is correct. edittext password field with now visible textview

Question:

Is there a way to let the softkeyboard scroll below the textview when the edittext is clicked or is there another way to make the password feedback visible to the user?

Eve
  • 1,153
  • 1
  • 15
  • 34
  • 1
    Possible duplicate of [SoftKeyboard hiding EditText](http://stackoverflow.com/questions/4432903/softkeyboard-hiding-edittext) – StarWind0 Jan 03 '17 at 20:56

1 Answers1

0

I would just put it in a scrollview. Then add bottom padding to the height of the soft board

In this case you have a recycler view. There is a Nested scrollview but without seeing your code I cannot recommend it. You can also add padding to the recyclerviews last element with the passwords for the same effect. But this design is starting to sound funky.. Maybe its time to break this into its own fragment / activity?

That said this SO looks like your solution

What you're looking for is the Activity's windowSoftInputMode attribute. You set this in your AndroidManifest.xml file, and give it a value such as:

adjustResize: "The activity's main window is always resized to make room for the soft keyboard on screen."

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." adjustResize will probably work for you, as long as you wrap the layout in a ScrollView. It may have negative effects if you have a bitmap image in the background, as it will be resized as well, in which case you may want to use adjustPan instead.

or

More information is available at the above link.

Community
  • 1
  • 1
StarWind0
  • 1,554
  • 2
  • 17
  • 46
  • Thanks, I will have a look at it. You wrote I should put it in a `scrollview`, but it is already in a `recyclerview`? – Eve Jan 03 '17 at 21:04