use of dz.easy.androidclient.Adapters.RendezVousStatesAdapter in project easy by MehdiBenmesa.
the class RendezVousStatesFragment method onViewCreated.
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
ButterKnife.bind(this, view);
if (GRID_LAYOUT) {
mRecyclerView.setLayoutManager(new GridLayoutManager(getActivity(), 2));
} else {
mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
}
mRecyclerView.setHasFixedSize(true);
//Use this now
mRecyclerView.addItemDecoration(new MaterialViewPagerHeaderDecorator());
try {
if (user.getString("_type").equals("Student")) {
mRecyclerView.setAdapter(new RendezVousStatesAdapter(user, (RendezVousStatesAdapter.AdapterInterface) this));
} else {
mRecyclerView.setAdapter(new RendezVousStatesAdapter(user, (RendezVousStatesAdapter.AdapterInterface) this));
}
} catch (JSONException e) {
e.printStackTrace();
}
}
Aggregations