LayoutManager для RecyclerView Grid с различной шириной ячейки

StaggeredGridLayoutManager кажется, не позволяет настроитьширина ячейки или охватывают несколько столбцов (кроме полного диапазона) для вертикальной ориентации.

Что является предпочтительнымLayoutManager для организации клеток, как показано выше?

Постскриптум Я просто хочу знать, как настроитьширина ячейки а не высота сStaggeredGridLayoutManager, Я знаю, что высоту можно настроить, как это реализовано в этомобразец.

public class VerticalStaggeredGridFragment extends RecyclerFragment {

    public static VerticalStaggeredGridFragment newInstance() {
        VerticalStaggeredGridFragment fragment = new VerticalStaggeredGridFragment();
        Bundle args = new Bundle();
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    protected RecyclerView.LayoutManager getLayoutManager() {
        return new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL);
    }

    @Override
    protected RecyclerView.ItemDecoration getItemDecoration() {
        return new InsetDecoration(getActivity());
    }

    @Override
    protected int getDefaultItemCount() {
        return 100;
    }

    @Override
    protected SimpleAdapter getAdapter() {
        return new SimpleStaggeredAdapter();
    }
}

адаптер

public class SimpleStaggeredAdapter extends SimpleAdapter {
    @Override
    public void onBindViewHolder(VerticalItemHolder itemHolder, int position) {
        super.onBindViewHolder(itemHolder, position);

        final View itemView = itemHolder.itemView;
        if (position % 4 == 0) {
            int height = itemView.getContext().getResources()
                    .getDimensionPixelSize(R.dimen.card_staggered_height);
            itemView.setMinimumHeight(height);
        } else {
            itemView.setMinimumHeight(0);
        }
    }
}

itemView.setMinimumWidth(customWidth) не влияет на ширину ячейки.

Чтобы упростить, я обновляю свою сетку

Как увеличить ширину ячейки 0 по сравнению с ячейкой 1 вStaggeredGridLayoutManager или любой другой менеджер макетов?

Ответы на вопрос(2)

Ваш ответ на вопрос