Example usage for android.support.v4.app SupportActivity setTitle

List of usage examples for android.support.v4.app SupportActivity setTitle

Introduction

In this page you can find the example usage for android.support.v4.app SupportActivity setTitle.

Prototype

void setTitle(CharSequence title);

Source Link

Usage

From source file:net.peterkuterna.android.apps.devoxxsched.util.UIUtils.java

/**
 * Set title and color of action bar./*from   w  w  w.j av  a  2  s .c  om*/
 * 
 * @param activity
 * @param title
 * @param color
 */
public static void setActionBarData(SupportActivity activity, String title, int color) {
    if (activity != null) {
        final ActivityHelper activityHelper = ((BaseActivity) activity).getActivityHelper();
        activity.setTitle(title);
        if (color != -1) {
            activityHelper.setActionBarColor(color);
        }
    }
}