From the course: Writing Secure Code for Android by Infosec

Unlock this course with a free trial

Join today to access over 25,400 courses taught by industry experts.

Activity: Creating a simple app – Two activities

Activity: Creating a simple app – Two activities

From the course: Writing Secure Code for Android by Infosec

Activity: Creating a simple app – Two activities

- [Instructor] Beginner bonus. Activity: Creating a simple app. Two activities. Open Android Studio. Open an existing project. Go to where your activity files are. Go to Course One. Go to Two Activities and select the "TwoActivitiesApp." And again, if you expand it, you can either select "app" or the parent "TwoActivitiesApp." Either one works okay. Let's continue to expand on the fun we've been having here. In the navigation pane, expand "app," expand "Java," expand "com." And now you see there are two activities. They are both class files. You can see they're class files. There's the "MainActivity," which is the entry point of the app. That's where we'll start. And then there's a "SecondActivity." Have you ever had an app where you did something in the app and it showed you a different screen? That is what the SecondActivity will be. It'll be a different screen. If we take a look in "res," if we expand "res" and we expand "layout," you'll see that there's "activity_main.xml," double…

Contents