Test: A few basic imports in an Android application program
4. Which of the following is the correct way in Android to get an integer state value (saved with key mDirection) from a Bundle object named icicle?
Congratulations! Correct Answer.
You Answered: None. If you took the test, your answer will show up here.
Correct Answer: mDirection = icicle.getInteger("mDirection");
ExplanationHere icicle is an object of type Bundle. The method getInteger() can be used to get the integer from that Bundle. And finally, you need to pass the proper key.
Take the TestTake the complete test on this topic. You will be able to review answers to questions and get a test score.
Take the Test
Question 4 of 5