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


Java Conductor类代码示例

本文整理汇总了Java中com.bluelinelabs.conductor.Conductor的典型用法代码示例。如果您正苦于以下问题:Java Conductor类的具体用法?Java Conductor怎么用?Java Conductor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Conductor类属于com.bluelinelabs.conductor包,在下文中一共展示了Conductor类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import com.bluelinelabs.conductor.Conductor; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);
    if (!sharedPrefsManager.isUserLoggedIn())
    {
        startActivity(LoginActivity.createIntent(this));
        finish();
        return;
    }
    setContentView(R.layout.activity_main);
    unbinder = ButterKnife.bind(this);

    initialiseDraggablePanel();
    router = Conductor.attachRouter(this, lytContent, savedInstanceState);
    routerAttacher.attachRoot(router);
}
 
开发者ID:jbmlaird,项目名称:DiscogsBrowser,代码行数:18,代码来源:MainActivity.java

示例2: onCreate

import com.bluelinelabs.conductor.Conductor; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    serviceTree = Services.getTree();
    if(!serviceTree.hasNodeWithKey(TAG)) {
        ServiceTree.Node node = serviceTree.createRootNode(TAG);
        ApplicationComponent applicationComponent = node.getService(Services.DAGGER_COMPONENT);
        mainComponent = DaggerMainComponent.builder().applicationComponent(applicationComponent).build();
        node.bindService(Services.DAGGER_COMPONENT, mainComponent);
    } else {
        mainComponent = Services.getNode(TAG).getService(Services.DAGGER_COMPONENT);
    }
    mainComponent.inject(this);
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    ButterKnife.bind(this);
    router = Conductor.attachRouter(this, root, savedInstanceState);
    router.addChangeListener(controllerChangeListener);
    if(!router.hasRootController()) {
        Log.d("MainActivity", "Set root [FirstController]");
        router.setRoot(RouterTransaction.with(new FirstController()));
    }
    previousState = router.getBackstack();
}
 
开发者ID:Zhuinden,项目名称:service-tree,代码行数:24,代码来源:MainActivity.java

示例3: onCreate

import com.bluelinelabs.conductor.Conductor; //导入依赖的package包/类
@Override protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);

  setContentView(R.layout.activity_main);

  ViewGroup container = (ViewGroup) findViewById(R.id.controller_container);
  Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
  setSupportActionBar(toolbar);

  getSupportActionBar().setTitle("Conductor-Dagger Sample");

  router = Conductor.attachRouter(this, container, savedInstanceState);
  if (!router.hasRootController()) {
    router.setRoot(RouterTransaction.with(new MainController()));
  }
}
 
开发者ID:Bodo1981,项目名称:conductor-dagger,代码行数:17,代码来源:MainActivity.java

示例4: onCreate

import com.bluelinelabs.conductor.Conductor; //导入依赖的package包/类
@Override
protected void onCreate(final Bundle poSavedInstanceState) {
    super.onCreate(poSavedInstanceState);
    setContentView(R.layout.activity_main);

    ApplicationAndroidStarter.sharedApplication().componentApplication().inject(this);

    ButterKnife.bind(this);

    if (mEnvironment.isDebugDrawerEnabled()) {
        mDebugDrawer = new DebugDrawer.Builder(this).modules(
                new FpsModule(Takt.stock(getApplication())),
                new ScalpelModule(this),
                new PicassoModule(mPicasso),
                new DeviceModule(this),
                new BuildModule(this),
                new NetworkModule(this),
                new SettingsModule(this)
        ).build();
    }

    mRouter = Conductor.attachRouter(this, mViewGroupContainer, poSavedInstanceState);
    if (!mRouter.hasRootController()) {
        mRouter.setRoot(RouterTransaction.with(new ControllerRepoList()));
    }
}
 
开发者ID:RoRoche,项目名称:AndroidStarterAlt,代码行数:27,代码来源:ActivityMain.java

示例5: onCreate

import com.bluelinelabs.conductor.Conductor; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    ButterKnife.bind(this);

    setSupportActionBar(toolbar);

    router = Conductor.attachRouter(this, container, savedInstanceState);
    if (!router.hasRootController()) {
        router.setRoot(RouterTransaction.with(new TransitionDemoController(0)));
    }
}
 
开发者ID:zawadz88,项目名称:Conductor-TransitionsEverywhere,代码行数:14,代码来源:MainActivity.java

示例6: onCreate

import com.bluelinelabs.conductor.Conductor; //导入依赖的package包/类
@Override protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  ViewGroup container = (ViewGroup)findViewById(R.id.controller_container);

  router = Conductor.attachRouter(this, container, savedInstanceState);
  if (!router.hasRootController()) {
    router.setRoot(RouterTransaction.with(new TideLocationsController()));
  }
}
 
开发者ID:bangarharshit,项目名称:ConductorMVP,代码行数:11,代码来源:MainActivity.java

示例7: onCreate

import com.bluelinelabs.conductor.Conductor; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    backstackDelegate = new BackstackDelegate(null);
    backstackDelegate.onCreate(savedInstanceState,
            getLastCustomNonConfigurationInstance(),
            HistoryBuilder.single(HomeKey.create()));
    backstackDelegate.registerForLifecycleCallbacks(this);
    super.onCreate(savedInstanceState);

    setContentView(R.layout.activity_main);
    ButterKnife.bind(this);

    navigation.setOnNavigationItemSelectedListener(item -> {
        switch(item.getItemId()) {
            case R.id.navigation_home:
                replaceHistory(HomeKey.create());
                return true;
            case R.id.navigation_dashboard:
                replaceHistory(DashboardKey.create());
                return true;
            case R.id.navigation_notifications:
                replaceHistory(NotificationKey.create());
                return true;
        }
        return false;
    });
    router = Conductor.attachRouter(this, root, savedInstanceState);
    controllerStateChanger = new ControllerStateChanger(router);
    backstackDelegate.setStateChanger(this);
}
 
开发者ID:Zhuinden,项目名称:simple-stack,代码行数:31,代码来源:MainActivity.java

示例8: onCreate

import com.bluelinelabs.conductor.Conductor; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    ViewGroup container = (ViewGroup) findViewById(R.id.controller_container);
    router = Conductor.attachRouter(this, container, savedInstanceState);
    if (!router.hasRootController()) {
        router.setRoot(RouterTransaction.with(new HomeController()));
    }
}
 
开发者ID:kbiakov,项目名称:newsreader-mvp-android,代码行数:12,代码来源:MainActivity.java

示例9: onCreate

import com.bluelinelabs.conductor.Conductor; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);
    mBinding = DataBindingUtil.setContentView(this, R.layout.activity_main);

    mRouter = Conductor.attachRouter(this, mBinding.container, savedInstanceState);
    if (!mRouter.hasRootController())
    {
        mMainController = new MainController();
        mRouter.setRoot(RouterTransaction
                .with(mMainController));
    }
}
 
开发者ID:sockeqwe,项目名称:mosby-conductor,代码行数:15,代码来源:MainActivity.java

示例10: onCreate

import com.bluelinelabs.conductor.Conductor; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    router = Conductor.attachRouter(this, (ViewGroup) findViewById(android.R.id.content), savedInstanceState);
    if (!router.hasRootController()) {
        controller = new TestController();
        router.setRoot(RouterTransaction.with(controller).tag(CONTROLLER_TAG));
    } else {
        controller = (TestController) router.getControllerWithTag(CONTROLLER_TAG);
    }
}
 
开发者ID:evant,项目名称:loadie,代码行数:12,代码来源:TestActivity.java

示例11: onCreate

import com.bluelinelabs.conductor.Conductor; //导入依赖的package包/类
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    ButterKnife.bind(this);
    assertNotNull(view);

    router = Conductor.attachRouter(this, (ViewGroup) findViewById(R.id.container),
            savedInstanceState);
    if (!router.hasRootController()) {
        router.setRoot(RouterTransaction.with(new TestController()));
    }
}
 
开发者ID:6thsolution,项目名称:EasyMVP,代码行数:14,代码来源:ConductorActivity.java

示例12: onCreate

import com.bluelinelabs.conductor.Conductor; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    ButterKnife.bind(this);

    router = Conductor.attachRouter(this, container, savedInstanceState);
    if (!router.hasRootController()) {
        router.setRoot(RouterTransaction.with(new HomeController()));
    }
}
 
开发者ID:Reline,项目名称:Jisho,代码行数:12,代码来源:MainActivity.java

示例13: setup

import com.bluelinelabs.conductor.Conductor; //导入依赖的package包/类
@Before
public void setup() {
  activityProxy = new ActivityProxy().create(null).start().resume();
  router = Conductor.attachRouter(activityProxy.getActivity(), activityProxy.getView(), null);
  container = activityProxy.getView();
}
 
开发者ID:seven332,项目名称:conductor-attacher,代码行数:7,代码来源:ControllerAttacherTest.java


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