https://grokonez.com/android/kotlin-gridview-example-show-item-details-android
Kotlin GridView example: Show Item Details | Android
In previous post, we had known how to show list of Items using GridView
. This tutorial shows you way to implement onClick Event on Item and come into its details.
Related Post: Kotlin ListView example | Android
I. Technologies
- Android Studio 3
- Kotlin 1.1.51
II. Overview
1. Goal
We will build an example that usesGridView
to show list of food items like this:
When clicking on any Item, we can go to its details in new Activity:
2. Project Structure
In this example, we add FoodDetails
Activity class. Clicking on any Item in MainActivity
will direct us to FoodDetails
(with image, name, description).
III. Practice
1. Set up Project
Add each item insides sample_images to res/drawable folder.
-
2. Layout
2.1 Container Layout
Open res/layout/activity_main.xml file:
More at:
https://grokonez.com/android/kotlin-gridview-example-show-item-details-android
Kotlin GridView example: Show Item Details | Android
Top comments (0)