Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Objective: Develop an Android application that demonstrates a day - night cycle animation using Android Studio. The app should have a gradual transition between day
Objective:
Develop an Android application that demonstrates a daynight cycle animation using Android Studio. The app should have a gradual transition between day and night, including the rotation of the sun and moon, as well as cloud movement.
Assets Required:
Day background image.
Night background image.
Sun image with a transparent background in PNG format
Moon image with a transparent background in PNG format
Cloud image with a transparent background in PNG format
Animation Logic:
Sun Animation:
The sun rotates in and out of the screen.
The rotation center for the sun and moon animations is set at the middle of the screen on the axis and at the bottom of the screen on the axis.
DayNight Transition:
The simulation begins in the middle of the day the sun is in the middle of the xaxis
While the sun is moving clockwise the day background remains apparent.
Gradually fade in the night background after the sun is out of the screen and start rotating the moon on the same path as the sun also clockwise
The moon will enter the screen from the left side and will move exactly like the sun and will leave the screen from the right side.
As the moon exits the screen, fade out the night background smoothly to show the day background.
Transition back to the day background with the sun's appearance.
Cloud Movement:
Have two cloud images moving in translation across the screen on the xaxis
One cloud should be above the sun and one behind it so if the sun happens to be in the same position as the first cloud, the sun will be behind. And if the sun and the second cloud were in the same position, the cloud would be behind.
One of the clouds translation duration should be seconds, the other cloud seconds.
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