December 2013
Beginner
416 pages
12h 45m
English
If you run the application on a device, you may have noticed that the timer text size is rather small on big screens, as shown in Figure 6.10.
Figure 6.10 Application showing small timer text
You can fix this by changing the text size in Java. Follow these steps.
1. Open the res/values/strings.xml file. Add a new dimension node called timer_text_size and give it a value of 60:
<dimen name="timer_text_size" >60sp</dimen>
2. Open TimerActivity.java, and in the onCreate method, just after the set of findViewById calls, get the dimension using the getDimension() method. Set the counter text ...
Read now
Unlock full access