質問

How can I change the Android StackedActionBar's Tab text color, Tab divider color, and selected navigation Tab selector color dynamically at runtime using java? I have not been able to find solutions for this without having to alter my XML each time. I have however been able to change the StackedActionBar's background color using the method for the ActionBar class:

setStackedBackgroundDrawable(Drawable drawable)

Thanks for any help in advance.

役に立ちましたか?

解決

If you are adding Stacked Tabs to the Actionbar pragmatically, then you can do the styling stuff via Java. If you are declaring the Actionbar's components in XML, then you cannot highly modify the styling stuff via Java.
Here is a detailed link for dealing with Action bar.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top