Question
On Android Studio do i have to retrieve value of a string token, use getResources.getString() ; syntax is: String greeting = getResources().getString(R.string.hello); R is automatically
On Android Studio do i have to retrieve value of a string token, use getResources.getString() ; syntax is: String greeting = getResources().getString(R.string.hello); R is automatically generated and string is a static class, hello is the name of the string in strings.xml and also declare Define a variable (global) in onSaveInstanceState, increment it by 1 and save it to the bundle; in onRestoreInstanceState, set variable to the value stored in the bundle and print it to the log file???
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
For each callback events (onCreate(), onStart() ), record what callback event was triggered in the log(use Log.d); the message that is written to log should be defined in strings.xml and getResources.getString() should be used to retrieve the message
Implement onSaveInstanceState and onRestoreInstanceState to track the number of times onSaveInstanceState is being called, in onRestoreInstanceState, print the value to the log file
Tag for Log statement should also be defined in strings.xml and set using getResources.getString()
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started