How can I fill RecyclerView with GridLayoutManager from right to left

前端 未结 5 579
别那么骄傲
别那么骄傲 2020-11-29 13:06

I\'m trying to fill some data into a RecyclerView with GridLayoutManager:

GridLayoutManager layoutManager = new GridLayoutManager(t         


        
5条回答
  •  心在旅途
    2020-11-29 13:37

    The answer by Mohammad is true but you do not need to create a new class. you can simply override isLayoutRTL method.

    GridLayoutManager lm = new GridLayoutManager(this, 2) {
        @Override
        protected boolean isLayoutRTL() {
            return true;
        }
    };
    

提交回复
热议问题