![]() Coupled with Evernote's Android State lib it's really cool that you can pass parameters to an instanced controller via its constructor for example and that's it, very easy to test. Other than that, it's really cool and the API is quite straightforward to understand and extend. The largest downsides are that documentation for tricky stuff is basically looking through use cases on their example apps, and mostly the fact that development on it stopped quite a while ago (though EricKuck has said to expect development to resume soon). Simple transition animations were actually the reason we stayed with it at my shop at first, years ago, and we stuck with it. It's a new method protected abstract Fragment getItem(int position). ![]() It's interesting because there already was an instantiateItem() there, they could have given any name, but no - they just called it getItem(). If they had named it createFragment() (just like they did in FragmentStatePager of ViewPager2), this problem would honestly never come up. It only works if you create the Fragment instance right there. The one thing that's always been a wonder for me though is the FragmentPagerAdapter.getItem() issue. I've never been a fan of the combined Activity lifecycle and the intent flags.īut yes, not taking super.onCreate() recreating fragments into consideration has most likely caused a lot of headaches to many people reading many stack traces. ![]() Not using Fragments and replacing them with Activities brings in its own set of complexities □, but that's not a "cardinal sin" because it doesn't really cause unexpected behavior, it just makes it tricky to do certain "should be simple" things. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |