Reputation: 351
When I focus on an edittextview on my chat activity, the recyclerview doesn´t keep the items stacked at the bottom when resizing the view. Previuosly with a ListView was working. I´ve tried any stackFromEnd, reverseLayout parameter.
Basically I want the same behaviour as any chat: whatsapp, telegram, etc.
Somebody has any idea why does it happen?
Upvotes: 5
Views: 2191
Reputation: 6656
I had the same situation, and this is how it is fixed:
Use mLayoutManager.setStackFromEnd
method in code. Setting in XML is not respected by android (in my situation).
mLayoutManager = new LinearLayoutManager(this);
mLayoutManager.setStackFromEnd(true);
mRecyclerView.setLayoutManager(mLayoutManager);
Upvotes: 9