Reputation: 6969
For example, I am using android.support.v4.view.PagerTabStrip
and I want to call its setTabIndicatorColor
with my choice of color. How to do it in layout XML file?
Upvotes: 1
Views: 359
Reputation: 43023
Best thing you can do is to consult the documentation. For PagerTabStrip
it is here.
There's a Summary section where you can check all XML attributes defined for that class. In this case, you can see that there are only attributes inherited from ViewGroup
and View
. None of them sets the tab indicator color.
This means that you need to set it in the code.
Let's look at the example where there is an attribute, e.g. orientation for LinearLayout
. There's a entry for android:orientation
attribute which tells you exactly how to set it in XML.
Upvotes: 1