public FeedbackPage() { OnLoaded += (s, view) => { swipeRefreshLayout = view.FindViewById <SwipeRefreshLayout>(Resource.Id.swipe_refresh_root); swipeRefreshLayout.SetDefaultColorScheme(); swipeRefreshLayout.Refresh += async delegate { if (isBusy) { return; } using (Busy()) { await LoadFeedbacksAsync(); } }; // itemsView = view.FindViewById <ListView>(Resource.Id.feedback_listview); itemsAdapter = new SmartAdapter <FeedbackInfoEx>(Activity, Resource.Layout.user_feedback_layout, ViewHolders.ItemHolders.FeedBackItemBindings); itemsView.Adapter = itemsAdapter; }; }
public BusRoutesActivity() : base(Resource.Layout.bus_routes_layout) { OnLoaded += async delegate { AllowBackNavigation(); var intent = Intent; bus = JsonConvert.DeserializeObject <BusInfo>(intent.GetStringExtra("bus")); SupportActionBar.Title = $"Routes - ({bus.Name})"; // swipeRefreshLayout = FindViewById <SwipeRefreshLayout>(Resource.Id.swipe_refresh_root); swipeRefreshLayout.SetDefaultColorScheme(); swipeRefreshLayout.Refresh += async(s, e) => { if (isBusy) { return; } using (Busy(true)) { await LoadRoutes(); } }; // listView = FindViewById <ListView>(Resource.Id.routes_list_view); fabAddRoute = FindViewById <FloatingActionButton>(Resource.Id.fab_add_route); if (intent.GetBooleanExtra("allow_add", false)) { fabAddRoute.Click += OnAddRoute; } else { // Hide add button fabAddRoute.Visibility = ViewStates.Gone; } // routesAdapter = new SmartAdapter <RouteInfo>(this, Resource.Layout.route_dropdown_item, ViewHolders.ItemHolders.RouteItemBindings); listView.Adapter = routesAdapter; // await LoadRoutes(); }; }