Java tutorial
//package com.java2s; import android.app.Activity; import android.graphics.drawable.ColorDrawable; public class Main { public static void setActionBarColor(Activity activity, int color) { activity.getActionBar().setBackgroundDrawable(new ColorDrawable(color)); refreshActionBar(activity); } public static void refreshActionBar(Activity activity) { activity.getActionBar().setDisplayShowTitleEnabled(false); activity.getActionBar().setDisplayShowTitleEnabled(true); } }