Get started with replacing your XML layouts with AnkoComponents in this video. Annyce walks through how to choose the proper library dependency and the basics of porting over your View components.
- [Instructor] Let's create our first custom Anko component.…And we're going to use it to display…the user interface for our planet detail fragment.…Now before we get started, we need to have…the dependency for the Anko layouts SDK.…That's what you see where on line 37.…Now the number that you provide behind SDK…is based on the the min SDK version that you specified…for your application.…Now since our min SDK is 21,…we're going to use the SDK 21 artifact.…
Now if you want to see a full listing…of available artifacts, you can find those here…at the Anko developer documentation,…and that's at github.com/Kotlin/anko.…Now, in our planet detail fragment,…let's switch there now.…We used the planet detail XML file…in order to display the screen.…What we want to do instead,…is to use an Anko component.…So in order to help with code separation,…we're going to create a new file in the same directory…which we're going to name planet detail UI.…
It's going to be a Kotlin class.…And it's called PlanetDetailUi.…So the first thing we're going to do is create our class,…
- 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 Davis4h 52m 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.