Here you can find the source of setDisplayHomeAsUpEnabled(Activity activity, boolean b)
public static void setDisplayHomeAsUpEnabled(Activity activity, boolean b)
//package com.java2s; //License from project: Apache License import android.app.ActionBar; import android.app.Activity; public class Main { public static void setDisplayHomeAsUpEnabled(Activity activity, boolean b) { ActionBar actionBar = activity.getActionBar(); if (actionBar != null) { actionBar.setDisplayHomeAsUpEnabled(b); }/*from w w w . ja v a2 s . c o m*/ } }