The day and night themes were added to the material design AppCompat libraries. Look at how we can switch between them and how that makes our application look different.
- [Instructor] We will now look at how to switch…between the day and night theme.…Our sample app shows a list of items…I am calling activities.…To illustrate how the switch from…light to dark mode works,…I'm making it so whenever a list item is touched,…it toggles between light and dark mode.…You won't need this functionality in our…final app, so we'll pull it out…after this exercise.…I want to implement the list item touch…event handler method.…To do that, first I'll right-click on it…and select quick fix.…Then I'll generate a method for it.…
And we'll drop that right at the bottom…under our on create method.…I'll get rid of the not implemented exception on this.…The first thing I want to do is figure out whether…we're currently in day or night mode…and to do this I'm going to store this…in a variable called current night mode.…We'll grab this out of the resources object,…which tells us how we're currently…displaying the activity.…
And we'll compare that to whether or not…we're using the night mask.…I had to right-click on this and fix it…
- 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.