I have a RecyclerView defined as:
<android.support.v7.widget.RecyclerView
android:id="@+id/message_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/message_input"
android:layout_alignParentTop="true"
app:stackFromEnd="true" />
Related code is also common used one:
LinearLayoutManager layoutManager = new LinearLayoutManager(this);
//layoutManager.setStackFromEnd(true);
mRecyclerView.setLayoutManager(layoutManager);
However when I add an item RecyclerView
, it does not respect app:stackFromEnd="true"
. On the other hand, if I uncomment and use layoutManager.setStackFromEnd(true);
programatically, it works fine. What is the problem I am missing? Any ideas are welcome.