int colors[] = { color1 , color2 , color3};
GradientDrawable bg =new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, colors);
actionBar.setBackgroundDrawable(bg);
int colors[] = { color1 , color2 , color3};
GradientDrawable bg =new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, colors);
actionBar.setBackgroundDrawable(bg);