RecyclerView之LayoutManager构造方法LinearLayoutManager(Context context, int orientation, boolean reve。。。。

    /**
     * @param context       Current context, will be used to access resources.
     * @param orientation   Layout orientation. Should be {@link #HORIZONTAL} or {@link
     *                      #VERTICAL}.
     * @param reverseLayout When set to true, layouts from end to start.
     */
    public LinearLayoutManager(Context context, int orientation, boolean reverseLayout) {
        setOrientation(orientation);
        setReverseLayout(reverseLayout);

 

 

使用LinearLayoutManager(Context context, int orientation, boolean reverseLayout)构造函数
可以设置数据的显示方向,设置reverseLayout为true即显示方向由下而上

你可能感兴趣的:(填坑)