The Anko Support plugin is available for Android Studio. It allows you to preview AnkoComponent classes directly in the IDE tool window. In this video, learn how to install it as well as how to debug common issues.
- [Instructor] The Anko support plugin is available for Android Studio. It allows you to preview your component classes directly in the IDE. To install it, you'll want to go to plugins, which is available through quick actions, command shift A, and search for plugins, and then at the top in your search bar, you can look for Anko Support. Now if it's not available, then click on search and repositories and then you'll see it listed here and you can install it and then restart Android Studio.
Now once that's completed, let's go ahead and close this side pane and anywhere inside of our component, we can do another command shift A, and this time, we're going to type Anko Layout Preview. Now this opens up our preview pane, similar to what we've seen with our XML layouts. And you can also access this if you go up to the toolbar through view, tool windows, and then down to Anko layout preview.
Now sometimes your preview may look like this. It's grayed out, and that's typically due to the fact that you need to rebuild your project, so if you just type command shift A and type Rebuild Project, this is going to refresh all of your resources and then notice that your Anko layout preview has been updated. So if you look at the layout, it's not quite as advanced as the XML layout features, especially because it doesn't support the extra capabilities that come with the tools name space, but all in all, Anko layouts is off to a good start and I'm excited to see where it lands a few miles from now.
- 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