I have tried with the following code to change the background of the actionbar. It works with 4.3 but not below 4.3. With the following code, null background is being set i
Finally,I found the solution. It was acheived by showing and hiding the title of action bar after setting background.
getActionBar().setBackgroundDrawable(ContextCompat.getDrawable(this,R.drawable.inbox_header));
actionBar.setDisplayShowTitleEnabled(true);
actionBar.setDisplayShowTitleEnabled(false);
Thank you all for your concern.