setup Action Bar, Show the Up button in the action bar. - Android android.app

Android examples for android.app:Action Bar

Description

setup Action Bar, Show the Up button in the action bar.

Demo Code

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

public class Main{

    public static void setupActionBar(final Activity activity) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
            // /*from  ww w  .  j a v a 2s.c om*/
            activity.getActionBar().setDisplayHomeAsUpEnabled(true);
        }
    }

}

Related Tutorials