Search code examples
androidandroid-layoutlistviewandroid-listviewright-to-left

How to Rtl Horizontal ListView?


I'm currently using the Devsmartlib.jar library.

in .xml file:

<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
android:gravity="right">

<com.devsmart.android.ui.HorizontalListView
    android:id="@+id/hlistview"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="right" />
</LinearLayout>

I want to show my list right to left , But it is not working.
Please help me.


Solution


  • this code is work!

    mLayoutManager = new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, true);
    
    mRecyclerView.setLayoutManager(mLayoutManager);