I've just recently been asked to work on an Android application. My usual day to day is .NET development so have been using Xamarin to develop this application. Something I'm beginning to regret I think. I've been using 'Xamarin.Android' rather than 'Xamarin.Forms', as the EMDK we are using needs requires that.
I've been trying to display different views on the same activity, trying to make a wizard like form. From different tutorials everything was pointing towards using Fragments, ViewPager and FragmentPagerAdapter.
But I have a lot of obsolete messages.
When I tried out the Fragments based on Microsoft tutorial (which is clearly out of date). I kept getting obsolete warnings and have started using AndroidX.Fragment to get around this. However FragmentPagerAdapter or FragmentStatePagerAdapter gave obsolete warnings as well.
I soon found a solution to that by passing in FragmentPagerAdapter.BehaviorResumeOnlyCurrentFragment in constructor this stopped the deprecated warnings for now.
public ExampleAdapter(FragmentManager fm, List<Fragment> examples) : base(fm,FragmentPagerAdapter.BehaviorResumeOnlyCurrentFragment)
But at this stage I'm feel like I should be using something else to achieve what I'm looking for. I just want an easy wizard form but something that is not going to be out of date in the next year or so.
If fragments are being deprecated then what would the alternative be, and is it something that can be done in Xamarin?