Exemplo n.º 1
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            rootView      = inflater.Inflate(Resource.Layout.WorkoutFragment, container, false);
            MyWorkoutList = new JavaList <WorkoutItem>();
            //init
            sv      = rootView.FindViewById <SearchView>(Resource.Id.searchView1);
            rv      = rootView.FindViewById <RecyclerView>(Resource.Id.mRecyclerID);
            adapter = new MyAdapter(MyWorkoutList);
            rv.SetAdapter(adapter);
            rv.SetLayoutManager(new LinearLayoutManager(Context));
            rv.SetItemAnimator(new DefaultItemAnimator());

            adapter.ItemClick += OnItemClick;
            RetrieveWorkouts();

            sv.QueryTextChange += sv_QueryTextChange;
            return(rootView);
        }
Exemplo n.º 2
0
 public static FilterHelper newInstance(JavaList <WorkoutItem> currentList, MyAdapter adapter)
 {
     FilterHelper.adapter     = adapter;
     FilterHelper.currentList = currentList;
     return(new FilterHelper());
 }