void updateListUserAdapter(User user) { mLayoutManager = new LinearLayoutManager(this); mRecyclerView.SetLayoutManager(mLayoutManager); userAdapter = new UserAdapter(user, this); mRecyclerView.SetAdapter(userAdapter); userAdapter.NotifyDataSetChanged(); }
public void updateListCardUiList() { mLayoutManager = new LinearLayoutManager(this); mRecyclerView.SetLayoutManager(mLayoutManager); userAdapter = new UserAdapter(userService.removeNullUsersJidUnsername(user), this); userAdapter.ItemClick += OnItemClick; mRecyclerView.SetAdapter(userAdapter); userAdapter.NotifyDataSetChanged(); mRecyclerView.RefreshDrawableState(); }
void updateListCardUi() { this.RunOnUiThread(() => { mLayoutManager = new LinearLayoutManager(this); mRecyclerView.SetLayoutManager(mLayoutManager); userAdapter = new UserAdapter(userService.removeRepetUsers(user), this); mRecyclerView.SetAdapter(userAdapter); userAdapter.NotifyDataSetChanged(); mRecyclerView.RefreshDrawableState(); VisibleProgress(Resource.Id.pbHeaderProgress, INVISIBLE); }); }
void searchInList() { search = (SearchView)FindViewById(Resource.Id.search); search.QueryTextChange += (s, e) => { string ch = ((SearchView)s).Query.ToUpper(); for (int i = 0; i < user.users.Count; i++) { string text = ""; if (user.users[i].username != null) { text = user.users[i].username.ToUpper(); } else if (user.users[i].Jid != null) { text = user.users[i].Jid.ToUpper(); } else { return; } if (text.Contains(ch)) { if (!filterUser.Contains(user.users[i])) { filterUser.Add(user.users[i]); } } else { filterUser.Remove(user.users[i]); } } User u = new User(); u.users = filterUser; mLayoutManager = new LinearLayoutManager(this); mRecyclerView.SetLayoutManager(mLayoutManager); userAdapter = new UserAdapter(u, this); mRecyclerView.SetAdapter(userAdapter); userAdapter.NotifyDataSetChanged(); }; }