This course will be retired on June 1, 2025.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
This video highlights a problem running our app on devices with smaller screens. Fortunately, there are lots of ways to make an app work well and look good across different screen sizes.
Optional Challenge
If you'd like to explore setting portrait mode in code, try working through this example from StackOverflow and then proceed to the next video for a walkthrough.
- Create a custom Application class.
- Update the manifest to use this new custom class.
- Override the Application's
onCreate()
method. - Call
registerActivityLifecycleCallbacks()
and override theonActivityCreated()
method in the anonymous inner class.
Documentation
GitHub Repo
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up