Android examples for User Interface:Display
set Display Home As Up Enabled
//package com.java2s; import android.app.ActionBar; import android.app.Activity; import android.os.Build; public class Main { public static void setDisplayHomeAsUpEnabled(Activity activity, boolean enabled) { if (Build.VERSION.SDK_INT > Build.VERSION_CODES.HONEYCOMB) { ActionBar actionBar = activity.getActionBar(); //noinspection ConstantConditions actionBar.setDisplayHomeAsUpEnabled(enabled); }//from w ww. jav a 2 s .co m } }