public override Fragment GetItem(int position) { var fragmentInfo = Fragments.ElementAt(position); var fragment = Fragment.Instantiate(_context, FragmentJavaName(fragmentInfo.FragmentType)); ((MvxFragment)fragment).ViewModel = fragmentInfo.ViewModel; return(fragment); }
public override Fragment GetItem(int position) { var frag = Fragments.ElementAt(position); var fragment = Fragment.Instantiate(_context, FragmentJavaName(frag.FragmentType)); //Java.Lang.Class.FromType(typeof(frag)).Name); ((MvxFragment)fragment).DataContext = frag.ViewModel; return(fragment); }
public override Fragment GetItem(int position) { var fragInfo = Fragments.ElementAt(position); if (fragInfo.CachedFragment == null) { fragInfo.CachedFragment = Fragment.Instantiate(_context, FragmentJavaName(fragInfo.FragmentType)); var request = new MvxViewModelRequest(fragInfo.ViewModelType, null, null, null); ((MvxFragment)fragInfo.CachedFragment).ViewModel = Mvx.Resolve <IMvxViewModelLoader>().LoadViewModel(request, null); } return(fragInfo.CachedFragment); }
public override Java.Lang.ICharSequence GetPageTitleFormatted(int p0) { return(new Java.Lang.String(Fragments.ElementAt(p0).Title)); }