Changing ActionBar tabs underline color programmatically

后端 未结 8 1913
误落风尘
误落风尘 2020-12-01 18:28

I have created the action bar by

ActionBar actionbar = getActionBar()

The background of the action bar is changed by

acti         


        
8条回答
  •  长情又很酷
    2020-12-01 18:46

    I'll suggest you use ActionBarSherlock. There is one sample available in the library named "Style ActionBar". (this is only way you can change ActionBar tabs underline color)

    if you have customized ActionBar then You have to add this style in ActionBar Style

    or here is way how to Do this

    enter image description here

    create style like below (here i have used ActionBarShareLock if you don't want to use then use android-support-v4.jar for support all Android OS Version)