// Displays the all the users sorted by "match" private void DisplayUsers(View view) { mUsers = new List <Profile> (); foreach (Profile user in db.Query <Profile>("SELECT * FROM Profile")) { if (!(user.StudentID == mCurrentUser.StudentID)) { mUsers.Add(user); } } mUsers = mUsers.OrderByDescending(user => user.GetRank(mCurrentUser)).ToList(); // Add users to the mUsers list // Inflate the listview with the mUsers list mUsersList = view.FindViewById <ListView>(Resource.Id.listFriends); mAdapter = new FriendAdapter(Activity, mUsers, mCurrentUser); mUsersList.Adapter = mAdapter; }
public FriendFilter(FriendAdapter adapter) { mAdapter = adapter; }