Java tutorial
//package com.java2s; /* ActivityHelper.java * See the file "LICENSE.md" for the full license governing this code. */ import android.annotation.TargetApi; import android.app.ActionBar; import android.graphics.drawable.Drawable; import android.os.Build; public class Main { @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) private static void setActionBarHomeIcon(ActionBar bar, Drawable icon) { bar.setIcon(icon); } }