How to start listview item from bottom to top?

Viewed 150

Hello sir I want to my list view from bottom like bellow image.. enter image description here

I want to show it from bottom to top.. Here I use list view xml code ...

             <ListView
                android:id="@+id/listView"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="bottom"
                android:divider="@android:color/transparent"
                android:dividerHeight="8dp"
                android:layout_margin="@dimen/margin_10"
                android:stackFromBottom="true"
                />

How to do it ? please help me

1 Answers

You can use the stackFromBottom attribute along with auto scroll to bottom whenever the view is updated.

Add the following to your ListView.

android:stackFromBottom="true"
android:transcriptMode="alwaysScroll"
Related