Search in sources :

Example 6 with CountriesAdapter

use of com.hannesdorfmann.mosby3.sample.mvp.CountriesAdapter in project mosby by sockeqwe.

the class RetainingCountriesFragment method onViewCreated.

@Override
public void onViewCreated(View view, @Nullable Bundle savedInstance) {
    super.onViewCreated(view, savedInstance);
    unbinder = ButterKnife.bind(this, view);
    // Setup contentView == SwipeRefreshView
    contentView.setOnRefreshListener(this);
    // Setup recycler view
    adapter = new CountriesAdapter(getActivity());
    recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
    recyclerView.setAdapter(adapter);
}
Also used : CountriesAdapter(com.hannesdorfmann.mosby3.sample.mvp.CountriesAdapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager)

Aggregations

LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)6 CountriesAdapter (com.hannesdorfmann.mosby3.sample.mvp.CountriesAdapter)6