Exemple #1
0
 void updateListUserAdapter(User user)
 {
     mLayoutManager = new LinearLayoutManager(this);
     mRecyclerView.SetLayoutManager(mLayoutManager);
     userAdapter = new UserAdapter(user, this);
     mRecyclerView.SetAdapter(userAdapter);
     userAdapter.NotifyDataSetChanged();
 }
Exemple #2
0
        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();
        }
Exemple #3
0
        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);
            });
        }
Exemple #4
0
        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();
            };
        }