Now that you have the avatar ImageButton control configured, you can work on handling the user click actions. When the user clicks the avatar button, you want to launch the appropriate activity (via Intent) and then handle the resulting image and set it as an avatar.
For now, you can save the avatar image locally on the handset. You also need to add a new preference to the application SharedPreferences. You begin by defining this new preference in the QuizActivity.java class, as follows: public static final String GAME_PREFERENCES_AVATAR = "Avatar";
Was this article helpful?