cooktheprogrammer
cooktheprogrammer

Reputation: 57

ScrollView goes to top when clicking on a text field, how to make it stay?

A short question - how do I make the scroll view actually stay at its position (bottom), when I click on an EditText type of field? Right now whenever I click on it, the scroll view goes straight to the top of screen as if it wanted to appear above the keyboard.

See images for the exact situation.

Normal view:

normal view

Messed up view, the scroll view goes to top instead of staying at the bottom:

messed up view, the scroll view goes to top instead of staying at the bottom

Upvotes: 0

Views: 457

Answers (1)

Elias Fazel
Elias Fazel

Reputation: 2113

   android:windowSoftInputMode="stateHidden|adjustPan"

set this to activity in manifest.xml

Upvotes: 1

Related Questions