Is there a practical way (in general) to create a right-to-left Horizontal-ListView in Android?
I already searched about it and find this but its doesn't seem generally practical!
Is there a practical way (in general) to create a right-to-left Horizontal-ListView in Android?
I already searched about it and find this but its doesn't seem generally practical!
RecyclerView helped me out (instead of horizontal-list-view) {thanX to @user2641570}.
accordding to documentation:
public LinearLayoutManager (Context context, int orientation, boolean reverseLayout)
Parameters context Current context, will be used to access resources.
orientation Layout orientation. Should be HORIZONTAL or VERTICAL.
reverseLayout When set to true, layouts from end to start.
so I just declare LinearLayoutManager as follows:
LinearLayoutManager layoutManager = new LinearLayoutManager(this,LinearLayoutManager.HORIZONTAL, true);
and everything is OK.
You should try using RecyclerView.
Here is a post explaining how to use it for an horizontal list view.
Edit:
Here is a sample from the linked post.
LinearLayoutManager layoutManager
= new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false);
RecyclerView myList = findViewById(R.id.my_recycler_view);
myList.setLayoutManager(layoutManager);
To use RecyclerView you should import the corresponding support library.
com.android.support:recyclerview-v7:21.0.0