Android Programming: The Big Nerd Ranch Guide, 5th Edition
by Bryan Sills, Brian Gardner, Kristin Marsicano, Chris Stewart
Styles, Themes, and Theme Attributes
Now you are going to add a few more tweaks to the design in list_item_crime.xml and, in the process, answer some lingering questions you might have about views and attributes.
In previous chapters, you used XML attributes to define various aspects of your views, such as the text within a TextView or the padding on a LinearLayout. You can also use XML attributes to set the size or color of text within a TextView.
Navigate back to the design view of list_item_crime.xml. Select crime_title and, in the attributes window, expand the textAppearance section under Common Attributes.
You could style your text by setting the individual attributes in this section, such as textSize and textColor – but that ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access