Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample case when using a view you cannot extend (e.g. DialogFragment) #45

Open
elprl opened this issue Aug 4, 2017 · 2 comments
Open

Comments

@elprl
Copy link

elprl commented Aug 4, 2017

What do you recommend doing when you cannot extend ViperFragment or ViperActivity? Let's say I have a custom view that already extends DialogFragment, what's the approach to rigging up / binding the presenter, interactor, router? I can't seem to find a suitable sample that fits this need.

@mkoslacz
Copy link
Owner

mkoslacz commented Aug 7, 2017

In the regular case I just try to attach Moviper internals to the given element. Actually, we do use DialogFragment with Moviper in our projects, but we haven't yet pushed and released appropriate classes. I'll do it in few days.

If it's not your case, just try to rewrite the root of the flavor you use, ie if you use the ViperAiPassive flavor, follow its inheritance chain (on the example of a Fragment):

ViperAiPassiveFragment -> ViperAiFragment -> MvpAiFragment -> Fragment

and try to rewrite it using another base class, ie DialogFragment instead of Fragment, but as I said, you don't need to do it if you need DialogFragment - I'll release it very soon.

@mkoslacz
Copy link
Owner

mkoslacz commented Oct 9, 2018

Well, obviously I have not pushed that to the project, but I will consider adding that to the upcoming Moviper 3.0. I'm not closing the issue as it's not fixed yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants