MvvmCross / MvvmCross-AndroidSupport

Android support library packages for MvvmCross: The .NET MVVM framework for cross-platform solutions.
http://mvvmcross.com
15 stars 0 forks source link

Doubts about MvxCachingFragment...Adapter #299

Closed IlSocio closed 7 years ago

IlSocio commented 7 years ago

Hi all, I just noticed that the two classes below have been marked as obsolete / deprecated

public class MvxFragmentPagerAdapter : FragmentPagerAdapter
public class MvxFragmentStatePagerAdapter : FragmentStatePagerAdapter

and have been replaced with the two classes below:

public abstract class MvxCachingFragmentPagerAdapter : PagerAdapter
public class MvxCachingFragmentStatePagerAdapter : MvxCachingFragmentPagerAdapter 

and I have a couple of concerns:

Marco.

nielscup commented 7 years ago

I have the same doubts, additionally: the MvxCachingFragmentStatePagerAdapter is not usable this way because the constructor now needs IEnumerable<FragmentInfo> fragments. The whole point of a StatePagerAdapter is that it is able to contain many pages which should be created in the adapter itself, instead of passing them into the constructor.

Cheesebaron commented 7 years ago

@nielscup they are created from the FragmentInfo. It contains enough information to inflate a View and attach a ViewModel to it.

Cheesebaron commented 7 years ago

Closing this as questions should be kept to StackOverflow, Slack or Xamarin Forums.