use of com.jexapps.bloodhub.m_UI.MyAppointmentOrgDataAdapter in project BloodHub by kazijehangir.
the class AppointmentsOrgFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = (View) inflater.inflate(R.layout.fragment_appointments_org, container, false);
db = FirebaseDatabase.getInstance().getReference().child("appointments");
appointments = new ArrayList<Appointment>();
keys = new ArrayList<String>();
fetchData();
numAppointments = (TextView) rootView.findViewById(R.id.num_appointments);
mRecyclerView = (RecyclerView) rootView.findViewById(R.id.appointment_list_recycler_view);
mRecyclerView.setHasFixedSize(true);
mLayoutManager = new LinearLayoutManager(getActivity());
mRecyclerView.setLayoutManager(mLayoutManager);
mRecyclerView.setItemAnimator(new DefaultItemAnimator());
mRecyclerView.addItemDecoration(new RecycleMarginDecoration(getActivity()));
mAdapter = new MyAppointmentOrgDataAdapter(appointments, keys);
mRecyclerView.setAdapter(mAdapter);
return rootView;
}
Aggregations