I need to add a different color for every tabs.
For Eg: like this below image
You cannot set a different background color on the action bar tabs as they take the color from the action bar itself and thus, they can all be the same color - one color, as the action bar.
If you want to get each tab a different color then you will have to write custom views (Button widgets in a horizontal LinearLayout with view pager) to simulate the behavior of tabs.