本文整理汇总了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);
}
示例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();
}
示例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()));
}
}
示例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()));
}
}
示例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)));
}
}
示例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()));
}
}
示例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);
}
示例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()));
}
}
示例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));
}
}
示例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);
}
}
示例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()));
}
}
示例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()));
}
}
示例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();
}