I'm using a recycler view to load different content. I want a chat like behavior as it is seen on chat apps. Items are arranged from top to bottom but when the element is large, newer messages are attached at the bottom and the user need not to scrool to the bottom.
I have tried:
RecyclerView recyclerView = (RecyclerView) findViewById(R.id.activity_comments_recycler_view);
LinearLayoutManager manager = LinearLayoutManager(this);
manager.setStackFromEnd(true);
manager.setReverseLayout(true);
recyclerView.setLayoutManager(manager);
<RecyclerView
android:id="@+id/activity_comments_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
Still not able to achieve the desired behavior. How do i fix this. Thanks.