Styling your views is key to having a pleasing Android user interface. Anko provides a helpful function to let you style multiple views in one go. In this video, learn how to use Anko's applyRecursively function.
- When working with layouts in XML…you could set the styling on each individual element…or create a style to be reused across them.…NCO allows you to do something similar.…We want to be able to support the styles…and layout decisions that we've made already.…For instance, here's our text view that contains…the planet's composition.…We've already set a style for it…we specified the type of heading that we would like…as well as that the text is selectable.…In using NCO, we want to be able to support…the same exact things.…
So let's move over to our NCO component…and add in these styles.…So we're going to move to the planet detail UI class.…And here's our first text view…that has the compound drawable.…So let's start by supplying our padding.…And if you recall the padding was equal to 16 dips…so we're going to use the VIP function.…We also had padding around the compound drawable…and it was exactly the same compound drawable padding.…
It was also 16.…And then we had that the text was selectable.…And so in this case we have to use one of the functions…
- What Kotlin has to offer
- Working with lambdas
- Common Android extension functions
- Kotlin Android Extensions overview
- Making use of the Anko library
- Working with coroutines
- Nullability and collections
Skill Level Intermediate
Android App Development: Data Persistence Librarieswith Annyce Davis3h 59m Intermediate
Developing AWS Lambda Functions with Kotlinwith Troy Miles1h 55m Intermediate
1. Kotlin Overview
2. Extension Functions and Properties
3. Incorporating Anko
4. Advanced Anko
5. Working with Collections
- 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.