Search in sources :

Example 1 with PlaceAdapter

use of ve.com.abicelis.remindy.app.adapters.PlaceAdapter in project Remindy by abicelis.

the class PlaceListActivity method setUpRecyclerView.

private void setUpRecyclerView() {
    mLayoutManager = new LinearLayoutManager(getApplicationContext(), LinearLayoutManager.VERTICAL, false);
    mAdapter = new PlaceAdapter(this, mPlaces);
    DividerItemDecoration itemDecoration = new DividerItemDecoration(this, mLayoutManager.getOrientation());
    itemDecoration.setDrawable(ContextCompat.getDrawable(this, R.drawable.item_decoration_complete_line));
    mRecyclerView.addItemDecoration(itemDecoration);
    mRecyclerView.setLayoutManager(mLayoutManager);
    mRecyclerView.setAdapter(mAdapter);
}
Also used : LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) DividerItemDecoration(android.support.v7.widget.DividerItemDecoration) PlaceAdapter(ve.com.abicelis.remindy.app.adapters.PlaceAdapter)

Aggregations

DividerItemDecoration (android.support.v7.widget.DividerItemDecoration)1 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 PlaceAdapter (ve.com.abicelis.remindy.app.adapters.PlaceAdapter)1