Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a new application from scratch (do not copy previous assignments). Name your main activity class LoggingLifecycleActivity. Override each of the lifecycle methods mentioned in

image text in transcribed

Create a new application from scratch (do not copy previous assignments). Name your main activity class "LoggingLifecycleActivity." Override each of the lifecycle methods mentioned in the lecture to do the following: a. call the same method on the super class. b. log a message with a custom tag and the name of the method being called. The tag should be defined as a constant in your activity and should include your first name. 2. Implement two different layouts:one for portrait orientation, and one for landscape orientation. Both layouts must include at least one ImageView, one ImageButton, and one TextView. a. The portrait orientation layout should display the views vertically in the order:ImageButton, Imageview, TextView. b. The landscape orientation layout must display the ImageView and ImageButton side-by-side, and the TextView across the top or bottom. Add at least two custom drawables to your project. The ImageView should display one of these drawables by default. When clicked, the ImageButton should change the image displayed by the ImageView (i.e. it must rotate through the different custom images each time it is pressed) Create an integer variable in your activity that keeps track of the number of times that the orientation of the device is changed, and uses the TextView to display a message and this number (e.g. "Display Rotated X Times"). The number should increment by 1 each time the device is rotated (CTRL-F12 is used to rotate an emulator). The images displayed by the ImageView and ImageButton should not change when the device orientation is changed. Use a Bundle to store/load the state each time the app is destroyed and recreated

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Distributed Relational Database Architecture Connectivity Guide

Authors: Teresa Hopper

4th Edition

0133983064, 978-0133983067

Students also viewed these Databases questions