I have created a chat activity and like facebook messenger, there is an EditText at the bottom and above is the RecyclerView of messages. When Keyboard opens, I want to scro
I had the same problem, what I did is when the keyboard opens, I scroll the recyclerView to the last item in the recyclerView, so no items will be hidden. I think this is much easier than the way you were proposing. So the code will be as follows:
recyclerView.postDelayed(new Runnable() {
@Override
public void run() {
recyclerView.scrollToPosition(recyclerView.getAdapter().getItemCount() - 1);
}
}, 300);