protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            SetContentView(Resource.Layout.Activity_RecyclerView);

            _recyclerView        = (RecyclerView)FindViewById(Resource.Id.recycler_view);
            _linearLayoutManager = new LinearLayoutManager(this);
            _recyclerView.SetLayoutManager(_linearLayoutManager);
            _myRecyclerAdapter = new RecyclerAdapter(this, _dataList);
            _recyclerView.SetAdapter(_myRecyclerAdapter);


            _swipeRefreshLayout = FindViewById <Views.SuperSwipeRefreshLayout>(Resource.Id.Swipe_Refresh);
            _swipeRefreshLayout.SetHeaderView(CreateHeaderView());
            _swipeRefreshLayout.SetFooterView(CreateFooterView());
            _swipeRefreshLayout.SetTargetScrollWithLayout(true);

            _swipeRefreshLayout.SetOnPullRefreshListener(new MyOnPullRefreshListener(this));
            _swipeRefreshLayout.SetOnPushLoadMoreListener(new MyOnPushLoadMoreListener(this));

            BuildDatas();

            _myRecyclerAdapter.NotifyDataSetChanged();
        }
 protected override void OnPostExecute(List <AwarePosts> result)   // this function is supposed to run on the UI thread
 {
     base.OnPostExecute(result);
     mAdapter = new RecyclerAdapter(result); // assigning the data here
     mAdapter.NotifyDataSetChanged();        //y'all kn what i'm trying to do here
     AndroidHUD.AndHUD.Shared.Dismiss(mContext);
     Toast.MakeText(mContext, "successful", ToastLength.Long).Show();
 }
예제 #3
0
                protected override void PublishResults(ICharSequence constraint, FilterResults results)
                {
                    using (var values = results.Values)
                        adapter.exercises = values.ToArray <Java.Lang.Object>().Select(r => r.ToNetObject <dbExercise>()).ToList();

                    adapter.NotifyDataSetChanged();
                    constraint.Dispose();
                    results.Dispose();
                }