8.4.5. textview_border.xml
The style ContactTextView that you created in the preceding section defines the appearance of the TextViews that are used to display a contact’s details. You specified a Drawable (i.e., an image or graphic) named @drawable/textview_border as the value for the TextView’s android:background attribute. In this section, you’ll define that Drawable in the app’s res/drawable-mdpi folder. If a Drawable is defined in only one of the project’s drawable folders, Android will use that Drawable on all device sizes and resolutions. To define the Drawable:
1. Right click the res/drawable-mdpi folder and select New > Android XML File.
2. Specify textview_border.xml as the File name and select shape as the root element, then click ...
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