private void GetCategories() { FirebaseDatabase database = FirebaseDatabase.Instance; FirebaseCallback p = new FirebaseCallback(); p.GetCategoriesAll(database); p.Categories += (sender, obj) => { progressBar.Visibility = ViewStates.Invisible; objCategories = obj; Adapter = new Category_Adapter(this, obj); recyclerView.SetAdapter(Adapter); Adapter.ItemClick += (s, o) => { p.Dispose(); database.Dispose(); Intent intent = new Intent(this, typeof(Activity_SubCategory)); ActivityOptionsCompat option = ActivityOptionsCompat.MakeSceneTransitionAnimation(this); intent.PutExtra("CategoryID", Adapter.category[o].CategoryID); intent.PutExtra("Category", Adapter.category[o].Category); intent.PutExtra("Translation", Adapter.category[o].Translation); StartActivity(intent, option.ToBundle()); }; }; }