本文整理汇总了Java中net.grandcentrix.thirtyinch.internal.TiPresenterProvider类的典型用法代码示例。如果您正苦于以下问题:Java TiPresenterProvider类的具体用法?Java TiPresenterProvider怎么用?Java TiPresenterProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TiPresenterProvider类属于net.grandcentrix.thirtyinch.internal包,在下文中一共展示了TiPresenterProvider类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: TestFragment
import net.grandcentrix.thirtyinch.internal.TiPresenterProvider; //导入依赖的package包/类
public TestFragment() {
addPlugin(new TiFragmentPlugin<>(new TiPresenterProvider<TestPresenter>() {
@NonNull
@Override
public TestPresenter providePresenter() {
return new TestPresenter();
}
}));
}
示例2: TestActivity
import net.grandcentrix.thirtyinch.internal.TiPresenterProvider; //导入依赖的package包/类
public TestActivity() {
addPlugin(new TiActivityPlugin<>(new TiPresenterProvider<TestPresenter>() {
@NonNull
@Override
public TestPresenter providePresenter() {
return new TestPresenter();
}
}));
}
示例3: TiActivityPlugin
import net.grandcentrix.thirtyinch.internal.TiPresenterProvider; //导入依赖的package包/类
/**
* Binds a {@link TiPresenter} returned by the {@link TiPresenterProvider} to the {@link
* Activity} and all future {@link Activity} instances created due to configuration changes.
* The provider will be only called once during {@link TiActivityPlugin#onCreate(Bundle)}. This
* lets you inject objects which require a {@link android.content.Context} and can't be
* instantiated in the constructor of the {@link Activity}. Using the interface also prevents
* instantiating the (possibly) heavy {@link TiPresenter} which will never be used when a
* presenter is already created for this {@link Activity}.
*
* @param presenterProvider callback returning the presenter.
*/
public TiActivityPlugin(@NonNull final TiPresenterProvider<P> presenterProvider) {
mDelegate = new TiActivityDelegate<>(this, this, presenterProvider, this,
PresenterSavior.getInstance());
}
示例4: TiFragmentPlugin
import net.grandcentrix.thirtyinch.internal.TiPresenterProvider; //导入依赖的package包/类
/**
* Binds a {@link TiPresenter} returned by the {@link TiPresenterProvider} to the {@link
* Fragment} and all future {@link Fragment} instances created due to configuration changes.
* The provider will be only called once during {@link TiFragmentPlugin#onCreate(Bundle)}. This
* lets you inject objects which require a {@link android.content.Context} and can't be
* instantiated earlier. Using the interface also prevents instantiating the (possibly) heavy
* {@link TiPresenter} which will never be used when a presenter is already created for this
* {@link Fragment}.
*
* @param presenterProvider callback returning the presenter.
*/
public TiFragmentPlugin(@NonNull final TiPresenterProvider<P> presenterProvider) {
mDelegate = new TiFragmentDelegate<>(this, this, presenterProvider, this,
PresenterSavior.getInstance());
}