Ejemplo n.º 1
0
        private void RakipAraEdittext_TextChanged(object sender, Android.Text.TextChangedEventArgs e)
        {
            List <MEMBER_DATA> searchedFriends = (from friend in favorilerRecyclerViewDataModels
                                                  where friend.firstName.Contains(RakipAraEdittext.Text, StringComparison.OrdinalIgnoreCase) || friend.lastName.Contains(RakipAraEdittext.Text, StringComparison.OrdinalIgnoreCase)
                                                  select friend).ToList <MEMBER_DATA>();

            this.Activity.RunOnUiThread(delegate
            {
                mViewAdapter = new ArkadasListRecyclerViewAdapter(searchedFriends, (Android.Support.V7.App.AppCompatActivity) this.Activity);
                mRecyclerView.HasFixedSize = true;
                mLayoutManager             = new LinearLayoutManager(this.Activity);
                mRecyclerView.SetLayoutManager(mLayoutManager);
                mRecyclerView.SetAdapter(mViewAdapter);
                mViewAdapter.ItemClick -= MViewAdapter_ItemClick;
                mViewAdapter.ItemClick += MViewAdapter_ItemClick;
            });
        }
Ejemplo n.º 2
0
        void GetUsers()
        {
            WebService webService = new WebService();
            var        Donus      = webService.OkuGetir("users");

            if (Donus != null)
            {
                favorilerRecyclerViewDataModels = Newtonsoft.Json.JsonConvert.DeserializeObject <List <MEMBER_DATA> >(Donus.ToString());
                if (favorilerRecyclerViewDataModels.Count > 0)
                {
                    favorilerRecyclerViewDataModels.Reverse();
                    this.Activity.RunOnUiThread(delegate
                    {
                        mViewAdapter = new ArkadasListRecyclerViewAdapter(favorilerRecyclerViewDataModels, (Android.Support.V7.App.AppCompatActivity) this.Activity);
                        mRecyclerView.HasFixedSize = true;
                        mLayoutManager             = new LinearLayoutManager(this.Activity);
                        mRecyclerView.SetLayoutManager(mLayoutManager);
                        mRecyclerView.SetAdapter(mViewAdapter);
                        mViewAdapter.ItemClick -= MViewAdapter_ItemClick;
                        mViewAdapter.ItemClick += MViewAdapter_ItemClick;
                    });
                }
            }
        }