July 2015
Beginner to intermediate
600 pages
18h 59m
English
Let’s go back over some of the attributes you added in fragment_crime.xml and answer some lingering questions you might have about widgets and attributes.
A style is an XML resource that contains attributes that describe how a widget should look and behave. For example, the following is a style resource that configures a widget with a larger-than-normal text size.
<style name="BigTextStyle">
<item name="android:textSize">20sp</item>
<item name="android:padding">3dp</item>
</style>
You can create your own styles (and you will in Chapter 20).
You add them to a styles file in res/values/ and refer to them in layouts like this: @style/my_own_style.
Take ...
Read now
Unlock full access