use of com.example.c4q.capstone.utils.FBUserDataListener in project Grupp by tmoronta1208.
the class InvitedFriendsFragment method convertIdsToUsers.
public void convertIdsToUsers(ArrayList<String> invitedList) {
friendsUserIDList = new ArrayList<>();
friendsUserIDList.addAll(invitedList);
Log.d("UserFriends Fragment", "convertIdsTousers");
if (friendsUserIDList != null) {
if (friendsUserIDList.size() != 0) {
for (String s : friendsUserIDList) {
userDataUtility.getPublicUser(s, new FBUserDataListener() {
@Override
public void getUid(String userID) {
}
@Override
public void getPublicUser(PublicUser publicUser) {
friendsUserList.add(publicUser);
}
});
}
if (friendsUserList != null) {
if (getActivity() != null) {
contactListAdapter = new ContactListAdapter(PublicUserDetails.class, R.layout.contact_item_view, ContactListViewHolder.class, contactsRef);
linearLayoutManager = new LinearLayoutManager(getActivity().getApplicationContext());
recyclerView.setAdapter(contactListAdapter);
recyclerView.setLayoutManager(linearLayoutManager);
recyclerView.addItemDecoration(new SimpleDividerItemDecoration(getContext()));
}
}
}
} else {
}
}
use of com.example.c4q.capstone.utils.FBUserDataListener in project Grupp by tmoronta1208.
the class ContactListFragment method loadFriendsList.
public void loadFriendsList(List<String> keyList) {
Log.d("user friends frag", "loadFriendsFrag" + friendKeys.size());
for (String s : friendKeys) {
Log.d("Contacts", "loadFriendsFrag: friends key strings: " + s);
fbUserDataUtility.getPublicUser(s, new FBUserDataListener() {
@Override
public void getUid(String userID) {
}
@Override
public void getPublicUser(PublicUser publicUser) {
friendsUserList.add(publicUser);
contactListAdapter.notifyDataSetChanged();
Log.d("CONTACTS", "loadFriendsList: friends name: " + publicUser.getFirst_name());
Log.d("CONTACTS", "loadFriendsList: public user list size: " + friendsUserList.size());
}
});
}
}
Aggregations