Java tutorial
//package com.java2s; import android.app.Activity; import android.os.Build; import android.view.View; public class Main { public static View findActionBarContainer(Activity activity) { if (Build.VERSION.SDK_INT > 11) { int id = activity.getResources().getIdentifier("action_bar_container", "id", "android"); return activity.findViewById(id); } else { return null; } } }