Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Android CollapsingToolbarLayout + NestedScrollView not Scroll to End when soft keyboard shown

Using appcompat 23.1.1, you cannot scroll to the end of a EditText inside the NestedScrollView, when the soft keyboard is shown. What happens is that it will scroll as far as the end would be if the keyboard were hidden.

In other words, the soft keyboard hides the last part of the text.

Variations on this question have been asked already with no definite answer. Most refer to appcompat 22.x being buggy. Has this been fixed for 23.1? Is there now a better workaround if not.

To reproduce this problem, simply create use Android Studio, create a new project and choose the "Scrolling Application", then change the TextView into EditText.

I tried adding to manifest,

 android:windowSoftInputMode="adjustResize"

But it makes no difference.

For reference, here are the project files:

https://gist.github.com/anonymous/73acc2d39f4e90c51217

Thanks for any help and suggestions

EDIT#1

This is still the case for appcompat-v7:23.2.0

Edit#2

Still there for appcompat 23.3.0 might be a bug. see this, https://code.google.com/p/android/issues/detail?id=182362

like image 970
jkj yuio Avatar asked Feb 19 '16 09:02

jkj yuio


1 Answers

Adding android:fitsSystemWindows="true" to NestedScrollView works with android:windowSoftInputMode="adjustResize" add in manifest.

like image 52
Rohan Shrestha Avatar answered Sep 21 '22 15:09

Rohan Shrestha