Android examples for android.app:Action Bar
setup Action Bar, Show the Up button in the action bar.
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); } } }