set color programmatically android code example
Example 1: android settextcolor programmatically
mTextView.setTextColor(Color.parseColor("#bdbdbd"));
Example 2: how to change actionbar color in android programmatically
getSherlockActivity().getSupportActionBar().setBackgroundDrawable(new ColorDrawable(0xff00ACED));
mActionBar.setBackgroundDrawable(new ColorDrawable(0xff00DDED));
mActionBar.setDisplayShowTitleEnabled(false);
mActionBar.setDisplayShowTitleEnabled(true);