@Test public void whenFLexAppearanceIsUsed_shouldFlexboxLayoutManagerBeUsed() { SelectOneListAdapter adapter = new SelectOneListAdapter(null, null, null, new ArrayList<>(), null, null, null, 0, 1, false); recyclerView.initRecyclerView(adapter, true); assertThat(recyclerView.getLayoutManager().getClass().getName(), equalTo(FlexboxLayoutManager.class.getName())); }
public void initRecyclerView(AbstractSelectListAdapter adapter, boolean isFlex) { if (isFlex) { enableFlexboxLayout(); } else { enableGridLayout(adapter.getNumColumns()); } setAdapter(adapter); adjustRecyclerViewSize(); }
ChoicesRecyclerView extends RecyclerView { public void initRecyclerView(AbstractSelectListAdapter adapter, boolean isFlex) { if (isFlex) { enableFlexboxLayout(); } else { enableGridLayout(adapter.getNumColumns()); } setAdapter(adapter); adjustRecyclerViewSize(); } }
ChoicesRecyclerView extends RecyclerView { public void initRecyclerView(AbstractSelectListAdapter adapter, boolean isFlex) { if (isFlex) { enableFlexboxLayout(); } else { enableGridLayout(adapter.getNumColumns()); } setAdapter(adapter); adjustRecyclerViewSize(); } ChoicesRecyclerView(@NonNull Context context);  ChoicesRecyclerView(Context context, AttributeSet attrs); }
ChoicesRecyclerView extends RecyclerView { public void initRecyclerView(AbstractSelectListAdapter adapter, boolean isFlex) { if (isFlex) { enableFlexboxLayout(); } else { enableGridLayout(adapter.getNumColumns()); } setAdapter(adapter); adjustRecyclerViewSize(); } ChoicesRecyclerView(@NonNull Context context);  ChoicesRecyclerView(Context context, AttributeSet attrs); void initRecyclerView(AbstractSelectListAdapter adapter, boolean isFlex); }
ChoicesRecyclerView extends RecyclerView { public void initRecyclerView(AbstractSelectListAdapter adapter, boolean isFlex) { if (isFlex) { enableFlexboxLayout(); } else { enableGridLayout(adapter.getNumColumns()); } setAdapter(adapter); adjustRecyclerViewSize(); } ChoicesRecyclerView(@NonNull Context context);  ChoicesRecyclerView(Context context, AttributeSet attrs); void initRecyclerView(AbstractSelectListAdapter adapter, boolean isFlex);  }