VOOZH about

URL: https://www.geeksforgeeks.org/android/how-to-create-a-paint-application-in-android/

⇱ How to Create a Paint Application in Android? - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

How to Create a Paint Application in Android?

Last Updated : 23 Jul, 2025

We all have once used the MS-Paint in our childhood, and when the system was shifted from desks to our palms, we started doodling on Instagram Stories, Hike, WhatsApp, and many more such apps. But have you ever thought about how these functionalities were brought to life? So, In this article, we will be discussing the basic approach used by such apps and will create a basic replica of such apps. 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 using both Java and Kotlin language. 

Step by Step Implementation

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. Select Java/Kotlin as the programming language.

Step 2: Add storage permissions in AndroidManifest

Add the following permissions in AndroidManifest.xml

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

Step 3: Adding the dependency in gradle.build.kts (Module :app)

We will wil be adding two libraries, one for the draw canvas and the other for the color palette. Refer to DrawingCanvas and ColorPicker to check out their github repositories.

dependencies {
implementation("com.github.Miihir79:DrawingCanvas:1.1.2")
implementation ("com.github.Dhaval2404:ColorPicker:2.3")
}

Adding Jitpack support in settings.gradle.kts

dependencyResolutionManagement {
..
repositories {
..
maven { url = uri("https://jitpack.io/") }
}
}

Step 3: Add icons in drawable

Add the following drawable files in res > drawable folder.


Step 4: Working with the activity_main.xml file

Navigate to the app > res > layout > activity_main.xml and add the below code to that file. Below is the code for the activity_main.xml file. 

activity_main.xml:

Step 5: Working with the MainActivity file

Go to the MainActivity file and refer to the following code. Below is the code for the MainActivity file. Comments are added inside the code to understand the code in more detail. 

Output:

Refer to this github repository to get the entire code.

Future Scope

There are plenty of things you can add to this project like:- 

  1. Adding a mask to the painted object, i.e. creating a blur or emboss effect on the stroke.
  2. Adding animations to the app.
  3. Adding a color selector for canvas, i.e. changing the color of canvas from the default White color as per the user requirement.
  4. Adding a sharing button, to directly share the drawing on various apps.
  5. Adding an eraser functionality that clears the specific path/stroke on which the eraser is dragged.
  6. Adding a shape picker, by which a user can directly select any particular shape from the list and can drag on the screen to create that shape.
  7. Enhancing UI, by adding a BottomSheet, vectors, etc.

"Anyone can put paint on a canvas, but only a true master can bring the painting to life.", we finish building our app, now draw some awesome paintings on this canvas and become a "true master". 

Comment

Explore