On Lollipop devices and higher we can easily change the status bar color at the very top of our device to match the color scheme of our application. We look at how that can be accomplished.
- [Narrator] The last thing we want to do…is set the background of the system bar…to the secondary color that we call primary dark.…We can do this on Lollipop and above devices,…but not on devices before, though there are…some workarounds for KitKat.…In our case, we are only working with Lollipop and above,…so we ensure the device is already on that version.…So I'll go up into the OnCreate and I'll check…to find out if we're actually running on Lollipop and above.…I'll put in an if statement and…we'll check the build version,…and we'll want to look at the Sdk integer,…and this is going to return back an integer value…of the Sdk, and we're looking for 21 and above.…
So we can say that's greater than equal to…BuildVersionCodes of the Lollipop.…We now want to tell our activity…that we want to change the system bar background.…So we're going to call Window, AddFlags, and we'll set that to…WindowManagerFlags.DrawsSystemBarBackgrounds.…The last thing we're going to do is set…our status bar color to our secondary color.…
- Breaking down a material design layout
- Adding AppCompat
- Adding icons and floating action buttons
- Animating the appearance
- Creating a RecyclerView
- Creating a ViewHolder
- Modifying the adapter
- Adding CardView
- Adding transition animations
- Adding a Snackbar
- Working with CoordinatorLayout
Skill Level Intermediate
1. What Is Android Material Design?
2. Implementing Material Design
3. Floating Action Button
View state change animations4m 17s
Next steps1m 40s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.