How to Create a New Activity in Android Studio?

Android Studio | Create a New Activity: In this tutorial, we will learn how to create a new activity in Android Studio – A step by step guide. By Manu Jemini Last updated : June 06, 2023

What is an Activity in Android Studio?

Activities hold your app together. This is where all your business login is and it also take care of which layout to show to user. Creating an activity is very simple and it can be created in many ways.

Steps to Create a New Activity in Android Studio

Step 1: First step is to open or create an android project in you android-studio.

Android activity 1

Step 2: Right click on the app directory and choose new → activity

Android activity 2

Step 3: You have variety of activities to choose from. According to you need choose one. I am choosing An Empty Activity.

Android activity 3

Step 4: It make a window to pop up and according to the chosen activity ask for basic information like name etc.

Android activity 4

Step 5: Fill the name and other information if you want to and press FINISH.

Step 6: It will open the activity automatically and corresponding layout file.

Android activity 5

Now you are all set with a poject, Thank you.

Comments and Discussions!

Load comments ↻

Copyright © 2024 All rights reserved.