use of garbagecollectors.com.unipool.adapters.UserAdapter in project UniPool by divya21raj.
the class ChatFragment 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_chat, container, false);
recycle = view.findViewById(R.id.recycle_users);
ArrayList<User> chatList = new ArrayList<>();
for (Map.Entry<String, User> entry : BaseActivity.getChatMap().entrySet()) chatList.add(entry.getValue());
recycleAdapter = new UserAdapter(chatList, getContext());
RecyclerView.LayoutManager layoutManager = new GridLayoutManager(getContext(), 1);
recycle.setLayoutManager(layoutManager);
recycle.setItemAnimator(new DefaultItemAnimator());
recycle.setAdapter(recycleAdapter);
return view;
}
Aggregations