-
Notifications
You must be signed in to change notification settings - Fork 22
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
How to handle ViewPager with new conductor version? #43
Comments
All right so to make it work with the latest conductor version one has to modify the MviConductorLifecycleListener class. The new conductor version LifecycleListener is not a class but an interface.Just exchange public class MviConductorLifecycleListener<V extends MvpView, P extends MviPresenter<V, ?>>
extends Controller.LifecycleListener with public class MviConductorLifecycleListener<V extends MvpView,P extends MviPresenter<V,?>> implements Controller.LifecycleListener Then declare your controllers like this: class SplashController:Controller,SplashView,
MviConductorDelegateCallback<SplashView, SplashPresenter> {
init {
addLifecycleListener(MviConductorLifecycleListener(this,true))
}
} Hope it helps others |
Another alternative would be to make a duplicate of the the MviController and MviConductorLifecycleListener classes. Change your custom MviController to use the new MviConductorLifecycleListener that now has a "implements" instead of the "extends". And you can go back to use something like:
|
@PaulEHugon I did not use latest conductor version yet so I didnt move Mosby to support Conductor 3.0 @PaulEHugon do you want to send a PR to add support for conductor 3.0? I dont have time and energy to spend effort on supporting Mosby + Conductor as I dont use conductor. |
@sockeqwe the PR is in. |
Hi There,
Seems like ControllerPagerAdapter is deprecated. But if I put the new implementation of the conductor view pager into my build gradle(implementation 'com.bluelinelabs:conductor-viewpager:3.0.0-rc5') then all my controller that extends RestoreViewOnCreateMviController are screaming the following:
Cannot access 'com.bluelinelabs.conductor.RestoreViewOnCreateController' which is a supertype of 'com....controllers.homeadmin.HomeAdminController'. Check your module classpath for missing or conflicting dependencies
Does it mean i will have to change all my controllers to extends Controller and implements
MvpView, MviConductorDelegateCallback<V, P> to be able to use the latest conductor version?
The text was updated successfully, but these errors were encountered: