January 2018
Intermediate to advanced
434 pages
14h 1m
English
So, let's now follow these steps to create the app we just discussed:
data class AndroidFlavours (var name:String, val image:Int)
We have defined the type of image as Int because we will be using the IDs of drawable items. In the drawable folder, we will be keeping all the required images.
val flavorList= listOf<AndroidFlavours>( AndroidFlavours("Cupcake",R.drawable.cupcake), AndroidFlavours("Donut",R.drawable.donut), AndroidFlavours("Eclair",R.drawable.eclair), AndroidFlavours("Froyo",R.drawable.froyo), AndroidFlavours("Gingerbread",R.drawable. ...
Read now
Unlock full access