I don’t understand what the book is saying:
I tried this, but it doesn’t work:
<style name="RemoteButton.boldButoon" >
Then I just copied what the default styles.xml file already does for its two styles, which works:
<style name="boldButoon" parent="RemoteButton">
In general, I am finding the android documentation impossible to figure out, when it comes to doing things in code. There is no TextView.setTextStyle() command. There is a TextView.setTextAppearance(), which may allow you to set the bold attribute:
[quote] setTextAppearance(Context context, int resid)
Sets the text color, size, style, hint color, and highlight color from the specified TextAppearance resource.[/quote]
Good luck figuring out what the “specified TextAppearance” is supposed to be though. Are there static fields defined in some class somewhere you use?
Searching brings up the R.attr class, which has:
[quote]public static final int textAppearance
Added in API level 1
Default appearance of text: color, typeface, size, and style.
Must be a reference to another resource, in the form “@[+][package:]type:name” or to a theme attribute in the form “?[package:][type:]name”.
Constant Value: 16842804 (0x01010034)[/quote]
Please explain this better. That is why I am reading a book instead of trying to learn it from the online documentation. I want the author to de-mystify the online docs.