From the course: Android Development Essential Training: App Architecture with Kotlin

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Start activities with explicit intents

Start activities with explicit intents - Android Tutorial

From the course: Android Development Essential Training: App Architecture with Kotlin

Start my 1-month free trial

Start activities with explicit intents

- [Instructor] My application now has two activities, the Main and the Dice activity, but I'm only able to see the Launcher activity. To fix this, I'll add a new button to the Main activity that the user touches or clicks to jump to the Dice activity and roll the dice. I'll go to the activity main file and right now, it doesn't have any UI elements, I'll drag in a button and then I'll constrain the button to the top, bottom, left and right edges. If you don't see the constraint anchors, just click off the button and click on again and they should appear. Now I'll change the unique ID of the button to rollButton and then I'll change a few UI elements, I'll go down to the bottom and find its text value. Notice there are two values here, the second one with the wrench is only for Android Studio in Design view, you'll want to change the first one. Click this little button to the right and that'll show you a Resources window with all of your string resources and choose the roll_em resource…

Contents