use of garbagecollectors.com.unipool.adapters.SentRequestsTEA in project UniPool by divya21raj.
the class SentRequestsFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_sent_requests, container, false);
finalCurrentUser = RequestActivity.getFinalCurrentUser();
sentRequests = finalCurrentUser.getRequestSent();
recycle = view.findViewById(R.id.recycle_requests);
if (sentRequests.size() >= 1) {
ArrayList<TripEntry> sentRequestsList = new ArrayList<>();
for (Map.Entry<String, TripEntry> entry : sentRequests.entrySet()) {
if (!entry.getKey().equals("dummyId"))
sentRequestsList.add(entry.getValue());
}
recyclerAdapter = new SentRequestsTEA(sentRequestsList, getContext());
RecyclerView.LayoutManager layoutManager = new GridLayoutManager(getContext(), 1);
recycle.setLayoutManager(layoutManager);
recycle.setItemAnimator(new DefaultItemAnimator());
recycle.setAdapter(recyclerAdapter);
}
return view;
}
Aggregations