set ActionBar Default Title - Android User Interface

Android examples for User Interface:ActionBar Title

Description

set ActionBar Default Title

Demo Code


//package com.java2s;
import android.app.ActionBar;

public class Main {
    public static void setTitleDefault(ActionBar actionBar,
            CharSequence title) {
        if (actionBar == null) {
            return;
        }//from  www .jav  a 2s.  c  o  m
        actionBar.setTitle(title);
        actionBar.setSubtitle(null);
        actionBar.show();
    }
}

Related Tutorials