protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); Tag = "Events"; SetContentView(Resource.Layout.view_events); FindViewById <GridView>(Resource.Id.grid).SetOnScrollListener(this); SupportActionBar.Title = ViewModel.GroupName; refresher = FindViewById <MvxSwipeRefreshLayout> (Resource.Id.refresher); refresher.SetColorScheme(Resource.Color.xam_darkblue, Resource.Color.xam_purple, Resource.Color.xam_blue, Resource.Color.xam_green); if (ViewModel.Events == null) { refresher.Refreshing = true; } else { refresher.Refreshing = ViewModel.CanLoadMore && ViewModel.Events.Count == 0; } refresher.RefreshCommand = ViewModel.RefreshCommand; LogEvent("Events", "Selected", ViewModel.GroupName); }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { base.OnCreateView(inflater, container, savedInstanceState); var view = this.BindingInflate(Resource.Layout.stories_view, null); var recyclerView = view.FindViewById <MvxRecyclerView>(Resource.Id.storiesRecyclerView); recyclerView.AddItemDecoration(new LineDividerItemDecoration(Activity)); _refreshLayout = view.FindViewById <MvxSwipeRefreshLayout>(Resource.Id.refresh_layout); ViewModel.Stories.CollectionChanged += OnStoriesCollectionChanged; return(view); }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { var view = base.OnCreateView(inflater, container, savedInstanceState); recyclerView = view.FindViewById <MvxRecyclerView>(Resource.Id.my_recycler_view); swipeToRefresh = view.FindViewById <MvxSwipeRefreshLayout>(Resource.Id.refresher); ViewModel.PropertyChanged += ViewModel_PropertyChanged; ViewModel.Title = GetString(Resource.String.app_name); //var presenter = (MvxAppCompatViewPresenter)Mvx.Resolve<IMvxAndroidViewPresenter>(); //var initialFragment = new HomeFragment { ViewModel = ViewModel }; //presenter.(FragmentManager, initialFragment); return(view); }
protected async override void OnCreate(Bundle bundle) { base.OnCreate(bundle); Tag = "Groups"; SetContentView(Resource.Layout.view_groups); refresher = FindViewById <MvxSwipeRefreshLayout> (Resource.Id.refresher); refresher.SetColorScheme(Resource.Color.xam_darkblue, Resource.Color.xam_purple, Resource.Color.xam_blue, Resource.Color.xam_green); if (ViewModel.Groups == null) { refresher.Refreshing = true; } else { refresher.Refreshing = ViewModel.CanLoadMore && ViewModel.Groups.Count == 0; } refresher.RefreshCommand = ViewModel.RefreshCommand; FindViewById <GridView> (Resource.Id.grid).SetOnScrollListener(this); }
public void Include(MvxSwipeRefreshLayout swipe) { swipe.Drag += (sender, args) => { }; }
public void Include(MvxSwipeRefreshLayout refreshLayout) { refreshLayout.Refreshing = refreshLayout.Refreshing; }