Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • Java
  • Android
  • Kotlin
  • Flutter
  • Dart
  • Android with Java
  • Android Studio
  • Android Projects
  • Android Interview Questions
Open In App
Next Article:
How to build a simple Calculator app using Android Studio?
Next article icon

How to Build a Simple Notes App in Android?

Last Updated : 20 Feb, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

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 access to the notes. Likewise, here let’s create an Android App to learn how to create a simple Notes App. So in this article let’s build a Notes App in which the user can add any data, remove any data as well as open any data.

Note that we are going to implement this project using both Java and Kotlin language. 

Resources Used in the Application

In this Application, we will be using Activities and Simple Java/Kotlin Code:

  • Main Activity: The Main Activity is used for Activities on the Main Page.
  • Detail Activity: Detail Activity is used for Details of the Notes Opened using the Open Button.
  • Add Note Activity: The Add Note Activity is used for Creating new Entries in the Data.
  • My Adapter: It is an Adapter for the list view used for Defining the Structure of Every Single List Item.

Layouts Used in this Application:

  • activity_main: The layout of the main page is used here.
  • list_item: The layout for the list item which is used in the main activity is mentioned here.
  • activity_detail: The layout for the window where we will be opening the Notes in Full Page in the CardView
  • activity_add_note: The layout for the window where we can add the new item on the main page.

Directory Structure of the Application

dir-notes-app


Steps for Creating a Notes Application on Android

Step 1: Create a New Project

To create a new project in Android Studio please refer to How to Create/Start a New Project in Android Studio.

Note: Select Java/Kotlin as the programming language.

Step 2: Working with the MainActivity and it’s layout file

In the activity_main.xml file the main page we will only display the Notes with Add , Open and Delete Button.

MainActivity.java
package org.geeksforgeeks.simple_notes_application_java;  import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.ListView;  import androidx.appcompat.app.AppCompatActivity;  import java.util.ArrayList; import java.util.List;  public class MainActivity extends AppCompatActivity {      private static final int REQUEST_CODE_ADD_NOTE = 1;     private MyAdapter adapter;     private List<String> items;      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);          ListView listView = findViewById(R.id.listView);         Button addNoteButton = findViewById(R.id.add_button);          // Initialize the list of items         items = new ArrayList<>();          // Add a temporary item         items.add("Temp Add Element");          // Create the adapter and set it to the ListView         adapter = new MyAdapter(this, items);         listView.setAdapter(adapter);          // Set click listener for the add note button         addNoteButton.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 Intent intent = new Intent(MainActivity.this, AddNoteActivity.class);                 startActivityForResult(intent, REQUEST_CODE_ADD_NOTE);             }         });     }      @Override     protected void onActivityResult(int requestCode, int resultCode, Intent data) {         super.onActivityResult(requestCode, resultCode, data);          if (requestCode == REQUEST_CODE_ADD_NOTE && resultCode == RESULT_OK) {             String newNote = data.getStringExtra("NEW_NOTE");             if (newNote != null) {                 items.add(newNote);                 adapter.notifyDataSetChanged();             }         }     } } 
MainActivity.kt
package org.geeksforgeeks.notes  import android.content.Intent import android.os.Bundle import android.widget.Button import android.widget.ListView import androidx.activity.enableEdgeToEdge import androidx.appcompat.app.AppCompatActivity import androidx.core.view.ViewCompat import androidx.core.view.WindowInsetsCompat   class MainActivity : AppCompatActivity() {     private var adapter: MyAdapter? = null     private lateinit var items: ArrayList<String>      override fun onCreate(savedInstanceState: Bundle?) {         super.onCreate(savedInstanceState)         enableEdgeToEdge()         setContentView(R.layout.activity_main)         ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->             val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())             v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)             insets         }          val listView = findViewById<ListView>(R.id.listView)         val addNoteButton = findViewById<Button>(R.id.add_button)           // Initialize the list of items         items = ArrayList()           // Add a temporary item         items.add("Temp Add Element")           // Create the adapter and set it to the ListView         adapter = MyAdapter(this, items)         listView.adapter = adapter           // Set click listener for the add note button         addNoteButton.setOnClickListener {             val intent = Intent(                 this@MainActivity,                 AddNoteActivity::class.java             )             startActivityForResult(intent, REQUEST_CODE_ADD_NOTE)         }     }       @Deprecated("This method has been deprecated in favor of using the Activity Result API\n      which brings increased type safety via an {@link ActivityResultContract} and the prebuilt\n      contracts for common intents available in\n      {@link androidx.activity.result.contract.ActivityResultContracts}, provides hooks for\n      testing, and allow receiving results in separate, testable classes independent from your\n      activity. Use\n      {@link #registerForActivityResult(ActivityResultContract, ActivityResultCallback)}\n      with the appropriate {@link ActivityResultContract} and handling the result in the\n      {@link ActivityResultCallback#onActivityResult(Object) callback}.")     override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {         super.onActivityResult(requestCode, resultCode, data)          if (requestCode == REQUEST_CODE_ADD_NOTE && resultCode == RESULT_OK) {             val newNote = data?.getStringExtra("NEW_NOTE")             if (newNote != null) {                 items.add(newNote)                 adapter!!.notifyDataSetChanged()             }         }     }      companion object {         const val REQUEST_CODE_ADD_NOTE: Int = 1     } } 
activity_main.xml
<?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout      xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto"     xmlns:tools="http://schemas.android.com/tools"     android:id="@+id/main"     android:layout_width="match_parent"     android:layout_height="match_parent"     tools:context=".MainActivity">      <TextView         android:id="@+id/textView3"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_margin="20dp"         android:gravity="center"         android:text="Notes"         android:textSize="20sp"         android:textStyle="bold"         app:layout_constraintTop_toTopOf="parent"         tools:layout_editor_absoluteX="0dp" />      <ListView         android:id="@+id/listView"         android:layout_width="match_parent"         android:layout_height="537dp"         android:layout_margin="20dp"         app:layout_constraintTop_toBottomOf="@+id/textView3"         tools:layout_editor_absoluteX="0dp" />      <Button         android:id="@+id/add_button"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:text="Add Note"         app:layout_constraintBottom_toBottomOf="parent"         app:layout_constraintEnd_toEndOf="parent"         app:layout_constraintStart_toStartOf="parent"         app:layout_constraintTop_toBottomOf="@+id/listView"         app:layout_constraintVertical_bias="0.722" />  </androidx.constraintlayout.widget.ConstraintLayout> 

Design UI:

notes-main


Step 3: Create an Adapter and it’s Layout file

Apart from this we will need a Layout template for every List Item. So, we will be creating a new Layout File. Also, we need a Program to Support the MainAcitivity for adding the functionalities to ListView Items i.e. Add Button and Delete Button. Create MyAdapter Class containing the Functionalities. Create New Java/Kotlin Class MyAdapter file in the main src project in the same repo as MainActivity file:

File Name: list_item.xml and MyAdapter.kt/.java

MyAdapter.java
package org.geeksforgeeks.simple_notes_application_java;  import android.content.Context; import android.content.Intent; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.TextView; import android.widget.Toast;  import java.util.List;  public class MyAdapter extends ArrayAdapter<String> {     private final Context context;     private final List<String> values;      public MyAdapter(Context context, List<String> values) {         super(context, R.layout.list_item, values);         this.context = context;         this.values = values;     }      @Override     public View getView(final int position, View convertView, ViewGroup parent) {         LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);         View rowView = inflater.inflate(R.layout.list_item, parent, false);          TextView textView = rowView.findViewById(R.id.textView);         Button openButton = rowView.findViewById(R.id.button);         Button deleteButton = rowView.findViewById(R.id.delete_button);          textView.setText(values.get(position));          openButton.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 // Start DetailActivity and pass the item data                 Intent intent = new Intent(context, DetailActivity.class);                 intent.putExtra("ITEM", values.get(position));                 context.startActivity(intent);             }         });          deleteButton.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 Toast.makeText(context, "Delete button clicked for item " + values.get(position), Toast.LENGTH_SHORT).show();                 // Remove the item from the list                 values.remove(position);                 // Notify the adapter to refresh the list view                 notifyDataSetChanged();             }         });          return rowView;     } } 
MyAdapter.kt
package org.geeksforgeeks.notes  import android.content.Context import android.content.Intent import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.ArrayAdapter import android.widget.Button import android.widget.TextView import android.widget.Toast  class MyAdapter(private val context: Context, private val values: MutableList<String>) :     ArrayAdapter<String?>(context, R.layout.list_item, values as List<String?>) {     override fun getView(position: Int, convertView: View?, parent: ViewGroup): View {         val inflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater         val rowView: View = inflater.inflate(R.layout.list_item, parent, false)          val textView = rowView.findViewById<TextView>(R.id.textView)         val openButton = rowView.findViewById<Button>(R.id.button)         val deleteButton = rowView.findViewById<Button>(R.id.delete_button)          textView.text = values[position]          openButton.setOnClickListener { // Start DetailActivity and pass the item data             val intent = Intent(context, DetailActivity::class.java)             intent.putExtra("ITEM", values[position])             context.startActivity(intent)         }          deleteButton.setOnClickListener {             Toast.makeText(                 context,                 "Delete button clicked for item " + values[position],                 Toast.LENGTH_SHORT             ).show()             // Remove the item from the list             values.removeAt(position)             // Notify the adapter to refresh the list view             notifyDataSetChanged()         }          return rowView     } } 
list_item.xml
<!-- res/layout/list_item.xml --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:orientation="horizontal"     android:padding="10dp">      <TextView         android:id="@+id/textView"         android:layout_width="0dp"         android:layout_height="wrap_content"         android:layout_weight="1"         android:hint="Empty Element" />      <Button         android:id="@+id/button"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_marginStart="10dp"         android:text="Open" />      <Button         android:id="@+id/delete_button"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_marginStart="10dp"         android:text="Delete" /> </LinearLayout> 

Design UI:

notes-list-item

Step 4: Creating New Layouts for Opening the Details and Adding the Items.

Go to app > java/kotlin > right-click > New > Activity > Empty Activity and name it as AddNoteActivity.

Note: Similarly Create DetailActivity.

Resource File Created :

  1. AddNoteActivity.java/.kt and activity_add_note.xml
  2. DetailActivity.java/.kt and activity_detail_activity.xml

Below is the code for AddNoteActivity:

AddNoteActivity.java
package org.geeksforgeeks.simple_notes_application_java;  import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText;  import androidx.appcompat.app.AppCompatActivity;  public class AddNoteActivity extends AppCompatActivity {      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_add_note);          EditText editText = findViewById(R.id.editTextNote);         Button buttonAdd = findViewById(R.id.buttonAddNote);          buttonAdd.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 String newNote = editText.getText().toString().trim();                 if (!newNote.isEmpty()) {                     Intent resultIntent = new Intent();                     resultIntent.putExtra("NEW_NOTE", newNote);                     setResult(RESULT_OK, resultIntent);                     finish();                 }             }         });     } } 
AddNoteActivity.kt
package org.geeksforgeeks.notes  import android.content.Intent import android.os.Bundle import android.widget.Button import android.widget.EditText import androidx.activity.enableEdgeToEdge import androidx.appcompat.app.AppCompatActivity import androidx.core.view.ViewCompat import androidx.core.view.WindowInsetsCompat   class AddNoteActivity : AppCompatActivity() {     override fun onCreate(savedInstanceState: Bundle?) {         super.onCreate(savedInstanceState)         enableEdgeToEdge()         setContentView(R.layout.activity_add_note)         ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->             val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())             v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)             insets         }          val editText = findViewById<EditText>(R.id.editTextNote)         val buttonAdd = findViewById<Button>(R.id.buttonAddNote)          buttonAdd.setOnClickListener {             val newNote = editText.text.toString().trim { it <= ' ' }             if (newNote.isNotEmpty()) {                 val resultIntent = Intent()                 resultIntent.putExtra("NEW_NOTE", newNote)                 setResult(RESULT_OK, resultIntent)                 finish()             }         }     } } 
activity_add_note.xml
<?xml version="1.0" encoding="utf-8"?> <LinearLayout      xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto"     xmlns:tools="http://schemas.android.com/tools"     android:id="@+id/main"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:orientation="vertical"     android:padding="16dp"     tools:context=".AddNoteActivity">      <EditText         android:id="@+id/editTextNote"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:hint="Enter your note here"         android:inputType="text"         android:textSize="20sp" />      <Button         android:id="@+id/buttonAddNote"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:text="Add Note" />  </LinearLayout> 

Design UI:

notes-add-note

And the code for DetailActivity:

DetailActivity.java
package org.geeksforgeeks.simple_notes_application_java;  import android.os.Bundle; import android.widget.TextView;  import androidx.appcompat.app.AppCompatActivity;  public class DetailActivity extends AppCompatActivity {      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_detail);          TextView detailTextView = findViewById(R.id.detailTextView);         TextView dataNotesTextView = findViewById(R.id.Data_Notes);          // Get the data passed from MainActivity         String item = getIntent().getStringExtra("ITEM");          // Set the data to the TextViews         detailTextView.setText("Notes Content");         dataNotesTextView.setText(item);     } } 
DetailActivity.kt
package org.geeksforgeeks.notes  import android.os.Bundle import android.widget.TextView import androidx.activity.enableEdgeToEdge import androidx.appcompat.app.AppCompatActivity import androidx.core.view.ViewCompat import androidx.core.view.WindowInsetsCompat  class DetailActivity : AppCompatActivity() {     override fun onCreate(savedInstanceState: Bundle?) {         super.onCreate(savedInstanceState)         enableEdgeToEdge()         setContentView(R.layout.activity_detail)         ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->             val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())             v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)             insets         }          val detailTextView = findViewById<TextView>(R.id.detailTextView)         val dataNotesTextView = findViewById<TextView>(R.id.Data_Notes)          // Get the data passed from MainActivity         val item = intent.getStringExtra("ITEM")          // Set the data to the TextViews         detailTextView.text = "Notes Content"         dataNotesTextView.text = item     } } 
activity_detail.xml
<?xml version="1.0" encoding="utf-8"?> <LinearLayout      xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto"     xmlns:tools="http://schemas.android.com/tools"     android:id="@+id/main"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:orientation="vertical"     android:padding="16dp"     tools:context=".DetailActivity">      <TextView         android:id="@+id/detailTextView"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_gravity="center"         android:layout_margin="15dp"         android:textSize="20dp" />      <androidx.cardview.widget.CardView         android:layout_width="match_parent"         android:layout_height="match_parent"         android:id="@+id/Card_View_Data">          <TextView             android:id="@+id/Data_Notes"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:textSize="20dp"/>     </androidx.cardview.widget.CardView>  </LinearLayout> 

Design UI:

notes-details

Output:

Final Application to Build a Simple Notes App


Note: The Application we have created is like a template for your Notes Application you can make changes in it as you want.

The GitHub Link for the Application is : Click Here to access the Complete Code to create a Simple Notes Application



Next Article
How to build a simple Calculator app using Android Studio?

K

kartiksrivastava6
Improve
Article Tags :
  • Android
  • Android apps
  • Android Projects
  • Java-Android
  • Kotlin Android

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

    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

    • How to Create Google Sign In UI using Android Studio?
      Nowadays, android apps are very popular. This UI has generally seen in the “Google Sign In” App. In this article, we will create a Google Sign UI in Android. Below are the various steps on how to do it. This will help the beginner to build some awesome UI in android by referring to this article.  St
      3 min read

    • How to Create Facebook Login UI using Android Studio?
      Nowadays, android apps are very popular especially social media apps. This UI has generally seen in the "Facebook Lite" App. In this article, we will create a Facebook login UI in Android. Below are the various steps on how to do it. Step by Step Implementation Step 1: Create a New Project To create
      2 min read

    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 "Exoplayer". In this article, we will be having 2 videos which are connected by the "Dialog box", i.e. a dialog box will come after comple
      5 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 things you will learn in this article: Implementing MediaPlayer class and using its methods like pause, play and stop. Using external files ( images, audio, etc ) in our project.Building the interface of our Music
      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/Kotlin 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.
      5 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

geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences