My Android app uses Button widgets with default style, which looks fine except on my Galaxy Tab 10.1. There, the default button style seems to have changed to a dark background with black text; it looks awful.
I have tried manually applying the default, built-in button style in XML like this; the problem tablet doesn’t change behavior and the well-behaved devices also do not change:
<Button
style="@android:style/Widget.Button"
<!-- other stuff -->
/>
The catch is that another built-in Button style does appear nicely (standard black text on grey background) on the misbehaving tablet:
<Button
style="@android:style/Widget.Button.Small"
<!-- other stuff -->
/>
The trouble, of course, is that this style makes the button smaller. What I’d really like to do is just find the standard source code (XML, Java, whatever) for Widget.Button and copy-paste it into my app.
Where can I find that source code?
You can find all the styles inside this file:
<installation folder>\android-sdk-windows\platforms\android-8\data\res\values\styles.xmlWhere
android-8can be changed to any other version of sdk.But it will not be so easy to changes this style, because it has references to drawables, which are not images, but xml files with their own references to another files.
You can look at one of such files here:
...\android-8\data\res\drawable\btn_default.xml