Skip to content

[todo-mvp] Pager Sample #207

Open
Open
@bytehala

Description

@bytehala

How would you go about creating a View-Presenter pair using FragmentPagerAdapter? In the case of a TODO App, what if I wanted to create a screen with 3 Tabs - Active, Completed, and... errr... Something.

I tried creating a View-Presenter pair for the page Fragments, but presenter.start() crashes on rotate because presenter is null. The page Fragment's onResume() is called before the presenter was initialized in the PagerAdapter constructor.

I'm guessing that instead of creating the View-Presenter pairs for the page Fragments (which are sub-views), it should only be done for the Activity content Fragment (the "main" view). I might be wrong though, so I need guidance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions