Skip to content

Usage with Fragment? Enhancement tips.Β #15

@zayo

Description

@zayo

I like to use these VM, but there is some use cases where it is hard to use IT.

For example:
Activity -> Fragment -> VM -> ViewPager

If i want to have Fragments in ViewPager i have to use childFragmentManager(), it is accessible from Fragment, but not from VM. Also if i have VM i could get parent activity, but not parent Fragment. When i got tablet application, i would use fragments. Of course i want to use arguments for fragments. But i cannot obtain them from VM directly, especialy in onViewAttached, where I should. How to deal with this problems? Will it be fixed?

Another Enhancement question:
Why is BaseActivity extends AppCompatActivity, but BaseViewModel getActivity() returns Activity?

I am not fully familiar with pull request, so that is the reason why i write here, instead of code.
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions