Beispiel #1
0
        private void SearchCategory(string query)
        {
            var result = objCategories.Where(o => o.SubCategory.Contains(query)).ToList();

            mCatAdapter = new SubCategory_Adapters(this, result);
            recyclerView.SetAdapter(mCatAdapter);
        }
Beispiel #2
0
        private void GetCategories()
        {
            FirebaseDatabase database = FirebaseDatabase.Instance;

            FirebaseCallback p = new FirebaseCallback();

            p.GetSubCategories(Selected, database);
            p.SubCategories += (sender, obj) =>
            {
                objCategories        = obj;
                mProgress.Visibility = ViewStates.Gone;
                mCatAdapter          = new SubCategory_Adapters(ApplicationContext, obj);
                recyclerView.SetAdapter(mCatAdapter);
                mCatAdapter.ItemClick += (s, o) =>
                {
                    ActivityOptionsCompat option = ActivityOptionsCompat.MakeSceneTransitionAnimation(this);
                    Intent intent = new Intent(this, typeof(ShoppingActivity));
                    intent.PutExtra("CategoryID", mCatAdapter.category[o].CategoryID);
                    intent.PutExtra("Category", mCatAdapter.category[o].SubCategory);
                    intent.PutExtra("Translation", mCatAdapter.category[o].Translation);

                    intent.PutExtra("SubCategory", mCatAdapter.category[o].SubCategoryID);
                    StartActivity(intent, option.ToBundle());
                };
            };
        }