示例#1
0
        // 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;
        }
示例#2
0
 public FriendFilter(FriendAdapter adapter)
 {
     mAdapter = adapter;
 }