May 2022
Intermediate to advanced
688 pages
20h 12m
English
There is a lot to do in this chapter. Fortunately, some of the grunt work can be done for you by Android Studio’s New Android Activity wizard.
Before you invoke the magic, open res/values/strings.xml and add all the strings you will need for this chapter.
Listing 7.1 Adding strings (res/values/strings.xml)
<resources>
...
<string name="incorrect_toast">Incorrect!</string>
<string name="warning_text">Are you sure you want to do this?</string>
<string name="show_answer_button">Show Answer</string>
<string name="cheat_button">Cheat!</string>
<string name="judgment_toast">Cheating is wrong.</string>
</resources>
Creating an activity typically involves touching at least ...
Read now
Unlock full access