What do Android default styles look like (in particular ButtonBar and ButtonBar.Button)?

In most examples for ICS + button panels, namely this one, by a Google engineer: https://gist.github.com/2357306

I see a link to these styles:

style="?android:attr/buttonBarStyle" style="?android:attr/buttonBarButtonStyle" 

So, I opened Android attrs.xml, and this is what I see:

  <!-- Style for buttons within button bars --> <attr name="buttonBarButtonStyle" format="reference" /> <!-- Style for button bars --> <attr name="buttonBarStyle" format="reference" /> 

What is it. So maybe this is a style? Here styles.xml:

  <style name="Widget.Holo.ButtonBar"> <item name="android:divider">?android:attr/dividerVertical</item> </style> <style name="Widget.Holo.ButtonBar.Button"> </style> 

A? Yet Eclipse and devices can display them as follows:

Button bar on ICS

So how does he get the right sizes and stuff? The reason I need them is because I want to use this buttonBarStyle style on Gingerbread and below, which do not have the buttonBarStyle attribute. Thus, they do wrong:

Button bar on GB

+4
source share
1 answer

This is due to style inheritance. Widget.Holo.ButtonBar inherits all the styles "Widget.Holo" and "Widget".

+1
source

Source: https://habr.com/ru/post/1435797/


All Articles