2 Answers2

1

I think you mean to the AppBar color. You can do it with

ActionBar bar = getActionBar();
bar.setBackgroundDrawable(new ColorDrawable(getRes‌​ources().getColor(R.c‌​olor.mycolor)); 

Add value in colors:

<color name="mycolor">#FFFFFF</color>

The answer is from here: Change action bar color in android

Community
  • 1
  • 1
Noy
  • 116
  • 1
  • 10
0

If you want to do in XML Try this tutorial from google

If you want to set it up in code:

public class MainActivity extends AppCompact {

      @Override
      protected void onCreate(final Bundle savedInstanceState) {

         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_main);
         ActionBar actionBar = getActionBar();
         actionBar.setBackgroundDrawable(new ColorDrawable(Color.BLUE)); // set your desired color
         ...
      }
     ...
  }
sumandas
  • 555
  • 7
  • 20