From the course: Intermediate Kotlin for Android Developers
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Anko commons: Design and support.v4
From the course: Intermediate Kotlin for Android Developers
Anko commons: Design and support.v4
- [Instructor] Anko provides several different artifacts that you can use to enhance your android development. In this video, we'll look at the use of the Snackbar, and fragments. So first we need to make sure we have the following dependencies in our build.gradle file. The anko-design dependency here on line 35, and the anko-support-v4-commons dependency on line 36. Since these aren't core to Anko, they're found in the different artifacts. Now we're going to be updating the PlanetDetailActivity class in order to take advantage of these new types of Anko extensions. Previously, we created our own extension on the view class to handle some limited interaction with the Snackbar. And that's here on line 21, where we created our own showSnackbar extension. But with the Anko Design Library, we no longer need to do that. So we can replace this code right here, with very simply, a call to Snackbar. And let's make sure we include the Anko Design import. That's just snackbar. But you'll notice…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Anko overview3m 33s
-
Anko commons: Basics4m 12s
-
Anko commons: Design and support.v43m 55s
-
Anko layouts: Basics3m 1s
-
Anko layouts: Create a custom component6m 2s
-
Anko layouts: Style component views4m 18s
-
Anko layouts: Use a custom component4m 16s
-
Anko layouts: Listeners4m 28s
-
Anko layouts: Anko Support plugin1m 54s
-
-
-
-