2.5.3. Adding and Configuring the TextView

Adding the TextView and Setting Its Id Property

To add the TestView to the GUI, from the Palette at the Graphical Layout editor’s left side, drag a TextView onto the welcomeRelativeLayout node in the Outline window. By default, the IDE gives the TextView the Id textView1. With the TextView selected in the Outline window, change its Id property to

Configuring the TextView’s Text Property Using a String Resource

According to the Android documentation for application resources

it’s considered a good practice to place strings, string arrays, images, colors, font sizes, dimensions and other app resources in XML file within the subfolders of ...

Get Android™ How to Program, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.