From the course: Building AI-Powered Android Apps with Gemini

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Review the Gemini Starter app's code

Review the Gemini Starter app's code

- [Narrator] The Gemini starter app's user interface is built with Jetpack Compose. I'm working in a version of the app that was based on the template from Android Studio, but now it's part of my GitHub repo. I'll start at the main activity class where the app starts up, and I'll drill down to where the work with Gemini is actually happening. This app is built with Jetpack Compose, so it starts with a theme and a surface, and then, within the surface, it calls the Baking Screen. This is a separate composable class, and it starts by creating a selected image that's remembered. Notice that this is a mutable integer state, and it starts with the value of zero, which means select the first image. I'll view usages for this variable, and I'll see that it changes at this point within this column. I'll jump there and see that, when you click a tile in this row, you're changing the selected image by setting the int value. I'll also look for the button at Line 111. There's an onClick setting…

Contents