当前位置: 首页>>代码示例>>Java>>正文


Java TiPresenterProvider类代码示例

本文整理汇总了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();
        }
    }));
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:10,代码来源:TestFragment.java

示例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();
        }
    }));
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:10,代码来源:TestActivity.java

示例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());
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:16,代码来源:TiActivityPlugin.java

示例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());
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:16,代码来源:TiFragmentPlugin.java


注:本文中的net.grandcentrix.thirtyinch.internal.TiPresenterProvider类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。