recycleview不显示

Listview用多了,少了布局管理器

加上
        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
        //配置布局,默认为vertical(垂直布局),下边这句将布局改为水平布局
        linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
        mbinding.recyclerView.setLayoutManager(linearLayoutManager);

发表评论 / Comment

用心评论~