December 2013
Beginner
416 pages
12h 45m
English
Layout files contain the elements (such as text views or buttons) that will be used in the user interface of your Android application. It’s important to be able to reference those user interface views with an id attribute in your Java code—for example, if you wanted to populate them with data. At compile time, every view with an id attribute in the layout XML file becomes a constant in the generated R.java file. These views can either be “stock” views defined in Android itself, or they can be classes that you have created and defined in your own project. The following are the various ways to refer to a view or to create a new view with an id that you can refer to.
@android:id refers ...
Read now
Unlock full access