March 2013
Beginner to intermediate
580 pages
16h 11m
English
Add a TextView widget to the GeoQuiz layout that reports the API level that the device is running to the user.
Figure 6.6 Finished challenge

You cannot set this TextView’s text in the layout because you will not know the device’s build version until runtime. Find the TextView method for setting text in the TextView reference page in Android’s documentation. You are looking for a method that accepts a single argument – a string (or a CharSequence).
Use other XML attributes listed in the TextView reference to adjust the size or typeface of the text.
Read now
Unlock full access