Java tutorial
//package com.java2s; //License from project: Apache License import android.app.Activity; import android.view.View; import android.view.Window; public class Main { public static View getActionBarView(Activity activity) { Window window = activity.getWindow(); View v = window.getDecorView(); // int resId = activity.getResources().getIdentifier("action_bar_container", "id", "android"); int resId = activity.getResources().getIdentifier("action_bar_container", "id", activity.getPackageName()); return v.findViewById(resId); } }