I use RecyclerView . It looks like this:
After clicking on EditText keyboard hits RecyclerView :
How to make it so that when you open the keyboard RecyclerView scrolled by its size, so that it was like this?
I use RecyclerView . It looks like this:
After clicking on EditText keyboard hits RecyclerView :
How to make it so that when you open the keyboard RecyclerView scrolled by its size, so that it was like this?
as it turned out, I was looking bad. found the solution in this post.
In my case, the code looks like this:
rvPrivateMessaging.addOnLayoutChangeListener(new View.OnLayoutChangeListener() { @Override public void onLayoutChange(View view, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) { if (bottom < oldBottom){ rvPrivateMessaging.post(new Runnable() { @Override public void run() { rvPrivateMessaging.scrollToPosition( rvPrivateMessaging.getAdapter().getItemCount() - 1); } }); } } }); Source: https://ru.stackoverflow.com/questions/637880/
All Articles