Search in sources :

Example 1 with EpoxyRecyclerView

use of com.airbnb.epoxy.EpoxyRecyclerView in project epoxy by airbnb.

the class MainActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    EpoxyRecyclerView recyclerView = (EpoxyRecyclerView) findViewById(R.id.recycler_view);
    recyclerView.setLayoutManager(new GridLayoutManager(this, 2));
    recyclerView.setController(controller);
    if (savedInstanceState != null) {
        carousels = savedInstanceState.getParcelableArrayList(CAROUSEL_DATA_KEY);
    }
    initTouch(recyclerView);
    updateController();
}
Also used : GridLayoutManager(androidx.recyclerview.widget.GridLayoutManager) EpoxyRecyclerView(com.airbnb.epoxy.EpoxyRecyclerView)

Aggregations

GridLayoutManager (androidx.recyclerview.widget.GridLayoutManager)1 EpoxyRecyclerView (com.airbnb.epoxy.EpoxyRecyclerView)1