5.4.5. dimens.xml

You created dimension resources in earlier chapters, so we show only a table (Fig. 5.11) of the dimension resource names and values here. Open dimens.xml in the res/values folder to display the resource editor for creating these resources. The spacing resource is used in the layouts as the spacing between various GUI components, and the answer_size resource specifies the font size for the answerTextView. Recall from Section 2.5.3 that font sizes should be specified in scale-independent pixels (sp) so that fonts in your app can also be scaled by the user’s preferred font size (as specified in the device’s settings).

Image

Fig. 5.11 | Dimension resources used in the Flag Quiz app.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.118.40