Different Types of Activities in Android Studio
Last Updated :
22 May, 2024
Android Studio is the official IDE (Integrated Development Environment) for Android application development and it is based on JetBrains’ IntelliJ IDEA software. Android Studio provides many excellent features that enhance productivity when building Android apps, such as:
- A flexible Gradle-based build system
- A fast and feature-rich emulator
- A blended environment where one can develop for all Android devices
- Apply Changes to push code and resource changes to the running app without restarting the app
- GitHub and Code template integration to assist you to develop common app features and import sample code
- Extensive testing tools and frameworks
- C++ and NDK support
- Built-in support for Google Cloud Platform, making it easy to integrate Google Cloud Messaging and App Engine and many more.
Generally, when a developer wants to create a new project in the android studio he/she needs to select a project template which is consisting of many activities as shown in the below image. (Considering that the developer developing the android app for phone and tablet). So in this article, we are going to discuss what do these activities mean in brief. Here is the list of activities:
- No Activity
- Basic Activity
- Bottom Navigation Activity
- Empty Activity
- Fullscreen Activity
- Google Admob Ads Activity
- Google Maps Activity
- Login Activity
- Master/Detail Flow
- Navigation Drawer Activity
- Settings Activity
- Scrolling Activity
- Tabbed Activity
- Fragment + ViewModel
- Native C++

(1) No Activity
As the name suggests No Activity means creating a new empty project. When the developer selects this activity there will be neither an XML file nor a Java/Kotlin file. No files are automatically generated when you select No Activity. The project structure will look like the following:

(2) Basic Activity
Basic Activity creates a new basic activity with the navigation component. When the developer selects the basic activity, then you will be getting a menu button, and you will also get a floating action button. These files are automatically created when you select Basic Activity:

(3) Bottom Navigation Activity
Bottom Navigation Activity creates a new activity with bottom navigations. We all have come across apps that contain a Bottom Navigation Bar. Some popular examples include Instagram, WhatsApp, etc. These files are automatically created when you select Bottom Navigation Activity and the following is the welcome page:

(4) Empty Activity
This is a popular activity and we frequently select this activity when we start developing an android project. It simply creates a new empty activity.
Note: Please mark the phase in No activity and Empty Activity. In No Activity, it creates a new empty project and in Empty Activity, it creates new empty activity. Please refer to Introduction to Activities in Android to get more information about the activities in android.
These files are automatically created when you select Empty Activity and the following is the welcome page:

(5) Fullscreen Activity
Fullscreen activity creates a new activity that toggles the visibility of the system UI (status and navigation bars) and action bar upon user interaction. Many apps are using Full-Screen Activity to have an attractive screen to show slides etc. These files are automatically created when you select Fullscreen Activity and the following is the welcome page:

(6) Google Admob Ads Activity
To earn money from the Android app or game, there are many ways such as in-App Purchases, Sponsorship, Advertisements, and many more. But there is another popular method to earn money from the Android app is by integrating an advertisement e.g known as Google AdMob. Google AdMob is designed with developers in mind, AdMob helps to earn more app revenue, deliver better user experience, and surface actionable insights all with automated tools that do the hard work for you. There are mainly four types of flexible, high-performing format available in Google AdMob
- Native: Ads that you design to fit the app, seamlessly
- Interstitial: Full-screen ads that capture attention and become part of the experience.
- Banner: Traditional formats in a variety of placements.
- Rewarded Video: An immersive, user-initiated video ad that rewards users for watching.
In Android Studio Google Admob Ads Activity creates an activity with AdMob Ad fragment. These files are automatically created when you select Google Admob Ads Activity and the following is the welcome page:

(7) Google Maps Activity
Android permits to integrate google maps in our application. One can show any location on the map or can show various routes on the map etc. One can also customize the map according to the choices. So Google Maps Activity creates a new activity with a Google Map. These files are automatically created when you select Google Maps Activity and the following is the welcome page:

(8) Login Activity
As the name suggests Login Activity creates a new login activity, allowing users to enter an email address and password to log in or to register with the application. Login Activity is one of the most common activities that almost every application contains this activity. These files are automatically created when you select Login Activity and the following is the welcome page:

(9) Master/Detail Flow
Master/Detail Flow creates a new master/detail flow, enabling users to view a collection of objects as well as details for each object. This flow is presented using two columns on tablet-sized screens and one column on handsets and smaller screens. This template creates two activities, a master fragment, and a detailed fragment. These files are automatically created when you select Master/Detail Flow and the following is the welcome page:

(10) Navigation Drawer Activity
Android Navigation Drawer is a sliding left menu that is used to display the important links in the application. The Navigation drawer makes it easy to navigate to and from between those links. It’s not visible by default and it needs to open either by sliding from left or clicking its icon in the ActionBar. In broader terms, Navigation Drawer is an overlay panel, which is a replacement of an activity screen that was especially dedicated to showing all the options and links in the application. These files are automatically created when you select Navigation Drawer and the following is the welcome page:

(11) Settings Activity
Setting Activity creates a new activity that allows a user to configure application settings. These files are automatically created when you select Settings Activity and the following is the welcome page:

(12) Scrolling Activity
Scrolling activity is an essential activity to have in the app as it provides the users with a perfect view when the layout is long. It creates a new vertical scrolling activity. These files are automatically created when you select Scrolling activity and the following is the welcome page:

(13) Tabbed Activity
In Android, TabLayout gives a horizontal layout to display tabs. If TabLayout is used then along with it, Fragment is also used, because fragments are lightweight and the app can have more functionality on a single screen if more fragments are added. Whenever the user clicks on the tab it will lead to the transaction of one Fragment to another. ViewPager is used to swipe between the tabs. WhatsApp, Facebook, etc. are a perfect example of TabLayout with ViewPager. This is how a TabLayout looks like.

Tabbed Activity creates a new blank activity with tabs. These files are automatically created when you select Tabbed Activity and the following is the welcome page:

(14) Fragment + ViewModel
As the name suggests Fragment + ViewModel creates a new activity and a fragment with the view model.
- Fragment: A Fragment is a piece of an activity which enable more modular activity design. A fragment encapsulates functionality so that it is easier to reuse within activities and layouts.
- ViewModel: It exposes those data streams which are relevant to the View. Moreover, it servers as a link between the Model and the View. Model: This layer is responsible for the abstraction of the data sources. Model and ViewModel work together to get and save the data. View: The purpose of this layer is to inform the ViewModel about the user’s action. This layer observes the ViewModel and does not contain any kind of application logic.
These files are automatically created when you select Fragment + ViewModel and the following is the welcome page:

(15) Native C++
Native C++ creates a new project with an empty activity configured to use JNI. JNI is the Java Native Interface. JNI describes a way for the bytecode that Android compiles from executed code that is written in the Java or Kotlin programming languages to interact with native code that is written in C/C++. JNI is vendor-neutral, has support for loading code from dynamic shared libraries, and while cumbersome at times is efficient.
Similar Reads
Android Studio Tutorial
It is stated that "If you give me six hours to chop down a tree then I will spend the first four hours in sharpening the axe". So in the Android Development World if we consider Android Development as the tree then Android Studio should be the axe. Yes, if you are starting Android Development then y
9 min read
Basics
How to Install and Set up Android Studio on Windows | Step by Step Guide
If you are starting your Android learning journey, Andriod Studio is the first thing you will install to write code on your system. This article will guide you on how to install and set up Android Studio on Windows 10, and 11 and what the actual Android Studio system requirements are. Quick Brief of
4 min read
Android Studio Main Window
Android Studio is the official IDE (Integrated Development Environment) for Android app development and it is based on JetBrainsâ IntelliJ IDEA software. Android Studio provides many excellent features that enhance productivity when building Android apps, such as: A blended environment where one can
4 min read
Different Types of Activities in Android Studio
Android Studio is the official IDE (Integrated Development Environment) for Android application development and it is based on JetBrains' IntelliJ IDEA software. Android Studio provides many excellent features that enhance productivity when building Android apps, such as: A flexible Gradle-based bui
7 min read
Android | Running your first Android app
After successfully Setting up an Android project, all of the default files are created with default code in them. Let us look at this default code and files and try to run the default app created. The panel on the left side of the android studio window has all the files that the app includes. Under
3 min read
How to Install Genymotion Emulator and Add itâs Plugin to Android Studio?
If you're an Android developer looking for a powerful and efficient emulator, installing the Genymotion emulator might be the perfect solution for you. Known for its speed and reliability, the Genymotion emulator for Android development offers a seamless experience. In this guide, we'll walk you thr
5 min read
How to Install Android Virtual Device(AVD)?
In android development, we need an android device to run the application. So, developers of Android Studio provide an option to install android virtual device to run it. In this article, we will learn how to install Android Virtual Device (AVD). Follow the below steps to install Android Virtual Devi
1 min read
File Structure
Android Project folder Structure
Android Studio is the official IDE (Integrated Development Environment) developed by the JetBrains community which is freely provided by Google for android app development. After completing the setup of Android Architecture we can create an android application in the studio. We need to create a new
3 min read
Android | Android Application File Structure
It is very important to know about the basics of Android Studio's file structure. In this article, some important files/folders, and their significance is explained for the easy understanding of the Android studio work environment. In the below image, several important files are marked: All of the f
3 min read
Android Manifest File in Android
Every project in Android includes a Manifest XML file, which is AndroidManifest.xml, located in the root directory of its project hierarchy. The manifest file is an important part of our app because it defines the structure and metadata of our application, its components, and its requirements. This
5 min read
Android | res/values folder
The res/values folder is used to store the values for the resources that are used in many Android projects including features of color, styles, dimensions, etc. In this article, we will learn about the res/values folder. Below explained are a few basic files, contained in the res/values folder: colo
3 min read
Android | build.gradle
Gradle is a build system (open source) that is used to automate building, testing, deployment, etc. "build.gradle" are script where one can automate the tasks. For example, the simple task of copying some files from one directory to another can be performed by the Gradle build script before the actu
4 min read
Assets Folder in Android Studio
It can be noticed that unlike Eclipse ADT (App Development Tools), Android Studio doesnât contain an Assets folder in which we usually use to keep the web files like HTML. Assets provide a way to add arbitrary files like text, XML, HTML, fonts, music, and video in the application. If one tries to ad
4 min read
Resource Raw Folder in Android Studio
The raw (res/raw) folder is one of the most important folders and it plays a very important role during the development of android projects in android studio. The raw folder in Android is used to keep mp3, mp4, sfb files, etc. The raw folder is created inside the res folder: main/res/raw. So we will
4 min read
Logcat Window in Android Studio
LogCat Window is the place where various messages can be printed when an application runs. Suppose, you are running your application and the program crashes, unfortunately. Then, Logcat Window is going to help you to debug the output by collecting and viewing all the messages that your emulator thro
2 min read
Where is debug.keystore in Android Studio?
Debug.keystore is one of the most important files which is present in almost every application when we download that app from the Google Play Store. This file is basically considered as the certificate of any application which is being verified by Google each and every time. Each app that you are be
2 min read
Important Tips and Tricks in Android Studio
How to Create/Start a New Project in Android Studio?
After successfully installing the Android Studio and opening it for the first time. We need to start with some new projects to start our journey in Android. In this article, we will learn about How to Create a New Project in Android Studio. Steps to Create/Start a New Android Project in Android Stud
2 min read
How to Speed Up Android Studio?
A slow Android Studio is a pain in the butt for an android developer. Developing an application with a slow IDE is not a cakewalk. It's also annoying that when you are focusing on the logic building for your app, and you got a kick to work and at that time your android studio suddenly starts lagging
7 min read
How to Upload Project on GitHub from Android Studio?
Learning how to upload a project to GitHub from Android Studio is an essential skill for developers, as it allows you to share your code, collaborate with others, and manage version control. With GitHub integration in Android Studio, it's easy to push your project to a repository. This guide will wa
3 min read
How to Convert SVG, PSD Images to Vector Drawable File in Android Studio?
In order to use the SVG (Scalable Vector Graphics) or PSD (Photoshop document) image file in your android studio project, you have to first convert them into an XML (Vector Drawable) file. Why XML (Vector Drawable) file? small in sizescalability (It scaled without loss of display quality)height and
3 min read
How to Create Drawable Resource XML File in Android Studio?
Prerequisite: Android Project folder Structure A drawable resource is a common concept for a graphic that can be drawn to the screen and which one can retrieve with APIs such as getDrawable(int) or apply to another XML resource with attributes such as android:drawable and android:icon. There are sev
3 min read
How to Add Local HTML File in Android Studio?
HTML stands for HyperText Markup Language. It is used to design web pages using a markup language. HTML is the combination of Hypertext and Markup language. Hypertext defines the link between the web pages. A markup language is used to define the text document within the tag which defines the struct
3 min read
How to Import External JAR Files in Android Studio?
A JAR (Java Archive) is a package file format typically used to aggregate many Java class files and associated metadata and resources (text, images, etc.) into one file to distribute application software or libraries on the Java platform. In simple words, a JAR file is a file that contains a compres
3 min read
How to Add Different Resolution Images in Android Studio?
Android supports a broad range of devices and if one wants to create an application in android then the application must be compatible with the different mobile devices. For supporting the different screen sizes one must have different size images that will save in multiple folders. Normally Android
2 min read
How to Create Classes in Android Studio?
In Android during the project development most of the time there is a need for classes in the projects. For example, in the case of CRUD operation, we need a model class to insert and retrieve data. Also to hold the info in our custom view we need to create a getter setter class. So basically in and
3 min read
How to Create Interfaces in Android Studio?
Interfaces are a collection of constants, methods(abstract, static, and default), and nested types. All the methods of the interface need to be defined in the class. The interface is like a Class. The interface keyword is used to declare an interface. public interface AdapterCallBackListener { void
4 min read
Frequently Occurring Errors and Solutions
How to Enable Vt-x in BIOS Security Settings in Intel Processors For Android Studio?
When a newbie tries to set up the Android Studio for the first time, the users will face this error, and this kind of error normal for the geeky guy or tech guru, But for beginner people, this is a tedious task. Letâs break down all the related words and try to put some light on these techie things.
4 min read
Different Ways to Fix "Error type 3 Error: Activity class {} does not exist" in Android Studio
Whenever we try to launch an activity we encounter the error "Error type 3: Activity class {} does not exist" in the Android Studio. The MainActivity Page throws the error as: Error while executing: am start -n âLauncherActivityâ -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Star
3 min read
Different Ways to fix âcannot resolve symbol Râ in Android Studio
You must have encountered the error âCannot resolve symbol Râ many times while building android projects. When you first create a new activity or new class, The R is red and Android Studio says it can't recognize the symbol R. So you may hover over the R symbol, press Alt + Enter to import missing a
3 min read
Different Ways to Fix âSelect Android SDKâ Error in Android Studio
Android SDK is one of the most useful components which is required to develop Android Applications. Android SDK is also referred to as the Android Software Development Kit which provides so many features which are required in Android which are given below: A sample source code.An Emulator.Debugger.R
5 min read
Different Ways to fix âDefault Activity Not Foundâ Issue in Android Studio
This is the most common issue faced by so many developers when creating a new Android Studio Project. This issue occurs because Android Studio was not able to detect the default MainActivity in your Android Studio Project. In this article, we will take a look at four different ways with which we can
3 min read
Different Ways to fix Cannot resolve symbol 'AppCompatActivity' in Android Studio
When you create a project and extends activity AppCompatActivity, sometimes you must have observed Android Studio throws an error that is: Cannot resolve symbol 'AppCompatActivity' and this error doesn't go away easily. In this article, we are going to cover topics: why there is a need to solve this
2 min read
Different Ways to fix "Execution failed for task ':app:clean'. Unable to delete file" error in Android Studio
When you try to rebuild or clean and build your project (containing mostly Kotlin code) in Android Studio, it fails and throws the error: Execution failed for task ':app:clean'. Unable to delete file: SpecificFileLocation So, In this article, we are going to see the topics: why there is a need to so
3 min read
Different Ways to fix "Execution failed for task ':processDebugManifest'" in Android Studio
AndroidManifest.xml file is one of the most important files in your Android Project. This file handles all other files in your Android Studio Project and also provides apk name and app logo for the generated apk in Android. Many times while building an Android project our Manifest file gets overwrit
4 min read
Different Ways to fix "DELETE_FAILED_INTERNAL_ERROR" Error while Installing APK in Android Studio
In Android Studio when building a new APK or while installing an application from Android Studio. You will get to see errors as shown in the title such as "DELETE FAILED INTERNAL ERROR". This error is generally due to conflicts in the APK version while installing a new Android app. This is how the e
4 min read
Different Ways to fix "Error running android: Gradle project sync failed" in Android Studio
Gradle is one of the most important components of Android apps. It handles all the backend tasks and manages all the external dependencies which we will be going to use in building our Android Application. Sometimes due to any issue or after formatting of your pc. Some of the Gradle files may get de
3 min read
Integrating Plugins
How to Install and Uninstall Plugins in Android Studio?
Android Studio provides a platform where one can build apps for Android phones, tablets, Android Wear, Android TV, and Android Auto. Android Studio is the official IDE for Android application development, and it is based on the IntelliJ IDEA. One can develop Android Applications using Kotlin or Java
3 min read
Integrating JsonToKotlin Plugin With Android Studio
Android Studio is the best IDE for android development. Plenty of plugins are available and they can be installed easily via Android Studio itself. In computing, a plug-in is a software component that adds a particular characteristic to an existing computer program. When a program supports plug-ins,
5 min read
Integrating Codeglance Plugin With Android Studio
Android Studio is the best IDE for android development. Plenty of plugins are available and they can be installed easily via Android Studio itself. In computing, a plug-in is a software component that adds a particular characteristic to an existing computer program. When a program supports plug-ins,
3 min read
How to Use ButterKnifeZelezny X Plugin in Android Studio?
Laziness is one of the most powerful properties of a good programmer, most android developers know about JakeWharton's ButterKnife annotation library. Without writing repeated elements like findViewById() and setONClickListner(), we use this library, so it can reduce the developer burden to write th
2 min read
Integrating Key Promoter X Plugin with Android Studio
Android Studio is the best IDE for android development. Plenty of plugins are available and they can be installed easily via Android Studio itself. A plugin is software written in Java/Kotlin which adds custom features to our Android Studio IDE. The main purpose of installing a plugin is to make the
3 min read
Building Sample Android UI using Android Studio
Building Some Cool Android Apps Using Android Studio
How to create a COVID-19 Tracker Android App
The world is facing one of the worst epidemics, the outbreak of COVID-19, you all are aware of that. So during this lockdown time let's create a COVID-19 Tracker Android App using REST API which will track the Global Stats only. Step by Step Implementation to Create Covid-19 Tracker Android Applicat
5 min read
Complete guide on How to build a Video Player in Android
This article explains the stepwise process as to how to build a Video Player using Android Studio. For viewing videos in android, there is a special class called "MediaPlayer". In this article, we will be having 2 videos which are connected by the "Dialog box", i.e a dialog box will come after compl
3 min read
How to create a Stopwatch App using Android Studio
In this article, an Android app is created to display a basic Stopwatch. The layout for Stopwatch includes: A TextView: showing how much time has passedThree Buttons:Start: To start the stopwatchStop: To stop the stopwatchReset: To reset the stopwatch to 00:00:00Step-by-Step Implementation of Stopwa
8 min read
How to Build a Simple Music Player App Using Android Studio
This is a very simple app suitable for beginners to learn the concepts. The following prerequisites are good enough before starting. Android fundamentals for beginnersInstall and Set up Android StudioFirst Android App ProjectHow to Run your first Android App The following things you will learn in th
6 min read
How to Build a Simple Notes App in Android?
Notes app is used for making short text notes, updating when you need them, and trashing when you are done. It can be used for various functions as you can add your to-do list in this app, some important notes for future reference, etc. The app is very useful in some cases like when you want quick a
9 min read
How to build a simple Calculator app using Android Studio?
Create a simple calculator which can perform basic arithmetic operations like addition, subtraction, multiplication, or division depending upon the user input. A sample video is given below to get an idea about what we are going to do in this article. Note that we are going to implement this project
6 min read
How to Build a Sticky Notes Application in Android Studio?
We as humans tend to forget some small but important things, and to resolve this we try to write those things up and paste them somewhere, we often have eyes on. And in this digital era, the things we are most likely to see are laptop, computer, or mobile phone screens. For this, we all have once us
11 min read
How to Build a Simple Flashlight/TorchLight Android App?
All the beginners who are into the android development world should build a simple android application that can turn on/off the flashlight or torchlight by clicking a Button. So at the end of this article, one will be able to build their own android flashlight application with a simple layout. A sam
6 min read
How to Build Spin the Bottle Game Application in Android?
In this article, we will be building a Spin the Bottle Game Project using Java and XML in Android. The application is based on a multiplayer game. One player spins the bottle and the direction in which the bottle spins will determine the player who gets selected for a task or any other stuff. There
4 min read
Miscellaneous
How to Add OpenCV library into Android Application using Android Studio?
OpenCV is the huge open-source library for computer vision, machine learning, and image processing and now it plays a major role in real-time operation which is very important in todayâs systems. By using it, one can process images and videos to identify objects, faces, or even the handwriting of a
3 min read
10 Important Android Studio Shortcuts You Need the Most
Android Studio is the official integrated development environment (IDE) for Android application development. In this article, some of the most imp shortcuts are explained in Android, with the help of examples. Some of the most important Shortcut keys used in Android Studio are: 1. CTRL + E -> Rec
3 min read
How to Create Your Own Shortcut in Android Studio?
Android Studio is the official integrated development environment for Googleâs Android operating system, built on JetBrainsâ IntelliJ IDEA software and designed specifically for Android app development. Android Studio offers a lot of shortcuts to users. It also provides to configure Keymap and add y
2 min read
How to Add Firebase Analytics to Android App in Android Studio?
Analytics is one of the important tools that developers should definitely used while building their applications. It is very helpful to target your apps for various audience ranges and to track on which screen the users are spending a long time. So it is one of the important features which one shoul
4 min read
How to Capture a Screenshot and Screen Recording of an Android Device Using Android Studio?
Android Studio is the official IDE (Integrated Development Environment) for Android app development and it is based on JetBrainsâ IntelliJ IDEA software. Android Studio provides many excellent features that enhance productivity when building Android apps. Whenever we are developing an app and in tha
2 min read
How to Create a New Branch on GitHub using Android Studio?
Creating a new branch on GitHub using Android Studio can help your development workflow by allowing you to work on new features or fixes without affecting the main codebase. In this article, we will walk you through the steps to create a new branch directly from Android Studio and push it to your Gi
2 min read
How to Create a Pull Request on GitHub using Android Studio?
Creating a pull request is an important part of collaborating on projects hosted on GitHub. It allows you to propose changes to a repository, enabling others to review, discuss, and merge your changes. Hereâs a step-by-step guide on how to create a pull request on GitHub using Android Studio. Steps
2 min read
Different Ways to Analyze APK Size of an Android App in Android Studio
APK size is one of the most important when we are uploading our app to Google Play. APK size must be considered to be as small as possible so users can visit our app and download our app without wasting so much data. In this article, we will take a look at How we can analyze our APK in Android Studi
3 min read
How to Print to the Console in Android Studio?
In computer technology, the console is simply a combination of a monitor and an input device. Generally, the input device is referred to here as the pair of mouse and keyboard. In order to proceed with the topic, we have to understand the terminology of computer science, which is an important part o
6 min read
Android Animation using Android Studio
In today's world which is filled with full of imagination and visualizations, there are some areas that are covered with the word animation. When this word will come to anyoneâs mind they always create a picture of cartoons and some Disney world shows. As we already know that among kids, animation m
5 min read