use of org.andydyer.androidtestdemo.ui.widgets.SimpleDividerItemDecoration in project android-test-demo by abdyer.
the class EventListFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_event_list, container, false);
ButterKnife.inject(this, view);
if (savedInstanceState == null) {
adapter = new EventsAdapter();
}
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
recyclerView.setItemAnimator(new DefaultItemAnimator());
recyclerView.addItemDecoration(new SimpleDividerItemDecoration(getActivity()));
recyclerView.setAdapter(adapter);
return view;
}
Aggregations