是否有一种实用的方法(一般来说)在 Android 中创建从右到左的水平 ListView ?
我已经搜索过并找到 this但它似乎并不普遍实用!
最佳答案
RecyclerView 帮助了我(而不是水平 ListView ){thanX to @user2641570}。
根据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.
所以我只是声明 LinearLayoutManager 如下:
LinearLayoutManager layoutManager = new LinearLayoutManager(this,LinearLayoutManager.HORIZONTAL, true);
一切都很好。
关于Android - 如何创建从右到左的水平ListView?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31263852/