Search in sources :

Example 6 with Controller

use of com.bluelinelabs.conductor.Controller in project Conductor by bluelinelabs.

the class BaseController method setTitle.

protected void setTitle() {
    Controller parentController = getParentController();
    while (parentController != null) {
        if (parentController instanceof BaseController && ((BaseController) parentController).getTitle() != null) {
            return;
        }
        parentController = parentController.getParentController();
    }
    String title = getTitle();
    ActionBar actionBar = getActionBar();
    if (title != null && actionBar != null) {
        actionBar.setTitle(title);
    }
}
Also used : Controller(com.bluelinelabs.conductor.Controller) ActionBar(android.support.v7.app.ActionBar)

Aggregations

Controller (com.bluelinelabs.conductor.Controller)6 Router (com.bluelinelabs.conductor.Router)3 Bundle (android.os.Bundle)2 BaseController (com.bluelinelabs.conductor.demo.controllers.base.BaseController)2 IdRes (android.support.annotation.IdRes)1 ActionBar (android.support.v7.app.ActionBar)1 View (android.view.View)1 ViewGroup (android.view.ViewGroup)1 OnClick (butterknife.OnClick)1 LifecycleListener (com.bluelinelabs.conductor.Controller.LifecycleListener)1 ControllerChangeHandler (com.bluelinelabs.conductor.ControllerChangeHandler)1 ControllerChangeType (com.bluelinelabs.conductor.ControllerChangeType)1 FadeChangeHandler (com.bluelinelabs.conductor.changehandler.FadeChangeHandler)1