use of garbagecollectors.com.unipool.models.User in project UniPool by divya21raj.
the class LoginActivity method dummyInitFinalCurrentUser.
private void dummyInitFinalCurrentUser(FirebaseUser user) {
GenLocation dummyGenLocation = new GenLocation("dummy", "dummy", 0d, 0d);
TripEntry dummyTripEntry = new TripEntry("dummy", "dummyId", "DummyUser", "12:00", "1/11/12", dummyGenLocation, dummyGenLocation, "dummyMessage", "", "", true);
HashMap<String, TripEntry> dummyUserEntries = new HashMap<>();
dummyUserEntries.put("dummy", dummyTripEntry);
HashMap<String, TripEntry> dummyRequestSent = new HashMap<>();
dummyRequestSent.put(dummyTripEntry.getEntry_id(), dummyTripEntry);
ArrayList<String> dummyUserIdList = new ArrayList<>();
dummyUserIdList.add("dummy");
HashMap<String, ArrayList<String>> dummyRequestReceived = new HashMap<>();
dummyRequestReceived.put("dummy", dummyUserIdList);
PairUp dummyPairUp = new PairUp("dummydummy", "dummy", "dummy", "dummy", dummyUserIdList);
HashMap<String, PairUp> dummyPairUps = new HashMap<>();
dummyPairUps.put("dummy", dummyPairUp);
FirebaseInstanceId.getInstance().getInstanceId().addOnSuccessListener(instanceIdResult -> {
String deviceToken = instanceIdResult.getToken();
String url = "";
Uri photoUrl = user.getPhotoUrl();
if (photoUrl != null)
url = photoUrl.toString();
finalCurrentUser = new User(user.getUid(), user.getDisplayName(), url, user.getEmail(), dummyUserEntries, dummyRequestSent, dummyRequestReceived, deviceToken, true, dummyPairUps);
});
}
use of garbagecollectors.com.unipool.models.User 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