set Up ActionBar - Android User Interface

Android examples for User Interface:ActionBar

Description

set Up ActionBar

Demo Code


//package com.java2s;

import android.app.Activity;
import android.os.Build;

public class Main {
    public static void setUpActionBar(Activity activity) {
        // Make sure we're running on Honeycomb or higher to use ActionBar APIs
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
            android.app.ActionBar actionBar = activity.getActionBar();
            actionBar.setHomeButtonEnabled(true);
        }/*from  w  ww.  jav a  2 s.c  om*/
    }
}

Related Tutorials