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