This library makes it easy for you to develop an simple drawing app in android

Overview

DrawingCanvas

GitHub license

Library for drawing app canvas

Features

  • Size , transperancy and color manupulation of brush -- Using setSizeForBrush(), setBrushAlpha() and setBrushColor() respectively
  • Undo and Redo fucntionality available -- Using undo() and redo() respectively
  • Using erase() function to match the background color to the brush color
  • Clear canvas feature -- Using clearDrawingBoard()

Demo

Watch the explaination on youtube: https://www.youtube.com/watch?v=Dnm3SI_OIko

DrawingApp.demo1.mp4

How to use

You can refer to this Video:

https://youtu.be/Dnm3SI_OIko

OR Follow these steps:

Step 1. Add this maven dependency to your build.gradle (project) file

allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

Step 2. Add the dependency to your build.gradle (app) file

dependencies {
           implementation 'com.github.Miihir79:DrawingCanvas:1.0.3'
   }

Step 3. Add the XML code

<com.mihir.drawingcanvas.drawingView
      android:id="@+id/drawing_view"
      android:layout_width="match_parent"
      android:layout_height="match_parent">

  </com.mihir.drawingcanvas.drawingView>

Step 4. Refrence the canvas in XML to use it's functions

    drawing_view.setBrushAlpha(120)// values from 0-255
    drawing_view.setBrushColor(R.color.white) 
    drawing_view.setSizeForBrush(12) // takes value from 0-35
    drawing_view.undo() 
    drawing_view.redo()
    drawing_view.redo(Color.WHITE) // give the color same as the background color
    drawing_view.clearDrawingBoard()
        

Demo of all the functions

setBrushAlpha

This function takes the value from 0-255. You can check it's implementation here:

setBrushColor

This function takes any color as an input. You can check it's implementation here:

setSizeForBrush

This function takes any value from 0-35 as an input. You can check it's implementation here:

undo and redo

These functions can undo and redo your strokes. You can check it's implementation here:

clearDrawingBoard

This function clears all the strokes and clear the drawing board. But carefully you wont be able to undo this change! You can check it's implementation here:

That's it!

If you liked it then show some love by giving a star.

Author and contributions:

I, Mihir Shah has made this library and will maintain it. All contributions are welcomed!

You might also like...
A simple and easy to use stopwatch and timer library for android

TimeIt Now with Timer support! A simple and easy to use stopwatch and timer library for android Introduction A stopwatch can be a very important widge

Project BlueWeather is an android app that lists the closest locations to you and shows the 7-day weather forecast for the location you select.
Project BlueWeather is an android app that lists the closest locations to you and shows the 7-day weather forecast for the location you select.

Project BLUEWEATHER Description Project BlueWeather is a weather forecast application for android. It lists the locations closest to you. It then prov

Task Timer - An android app that helps you to keep a track of how much time you spend on each task
Task Timer - An android app that helps you to keep a track of how much time you spend on each task

Task Timer - An android app that helps you to keep a track of how much time you spend on each task

when you use restful api and network get disconnect you have to store your data local for make your app faster and work on ofline mode

AppArchitectureOflineMode when you use restful api and network get disconnect you have to store your data local for make your app faster and work on o

Sunlight Apk - Sunlight App where You can decide Your Mood and Relative suggestions of what you can do will be displayed
Sunlight Apk - Sunlight App where You can decide Your Mood and Relative suggestions of what you can do will be displayed

Sunlight_Apk This Is a App where You can decide Your Mood and Relative suggestio

How-Many-People-Are-In-Space - Do you wonder how many people are in space? Now you can check instantly with this app

How Many People Are In Space? Do you wonder how many people are in space right n

App that allows you juice lemons until you have a glass of lemonade!! 🍹

Project: Lemonade App - Starter Code Starter code for the first independent project for [Android Basics in Kotlin] Introduction This is the starter co

An easy to use android library to let devs know how much internet-data their app is consuming
An easy to use android library to let devs know how much internet-data their app is consuming

EasyAnalytics! an easy to use android library to let developers know how much internet-data their app is consuming. We can identify this as we want ba

☁️🌤🌧☀ Weather Android application that gives you the weather information of your saved location or any region you are looking for☁️🌤🌧☀
☁️🌤🌧☀ Weather Android application that gives you the weather information of your saved location or any region you are looking for☁️🌤🌧☀

☁️🌤🌧☀ Weather Android application that gives you the weather information of your saved location or any region you are looking for☁️🌤🌧☀

Comments
  • Erase not working with transparent Layout

    Erase not working with transparent Layout

    Hello I am using your library for annotation purpose, so when I try to use erase functionality on a transparent background it is not working. can you help me in that?

    opened by jatankshirsagar 2
Releases(1.1.3)
Owner
Mihir Shah
Student at PDEU (2nd Year) | AppDev @Seatizen | App team core @dscpdpu
Mihir Shah
An android app will start when boot and exit after 1s. Develop for Redmi K40 to enable DC dimming automatically.

An android app will start when boot and exit after 1s. Develop for Redmi K40 to enable DC dimming automatically.

Ovear 4 May 13, 2022
A project which demonstrate how to develop a custom client on android for dribbble.com

##What is this? This is a project with custom client app on android for https://dribbble.com, which you can browse the popular icon and animation, lik

ZhangLei 599 Nov 14, 2022
Drawing Android App for Kids

Drawing-App This is Drawing App for Kids . Kids Paint Instead of just offering a blank canvas with a few brush and color options, Kids Paint turns thi

Payel Paul 1 Mar 21, 2022
Awesome Kid's Drawing App. It has a click and draws feature.

CanvaKids Overview It's a kid's drawing app which is build for android users. It is built in Kotlin with some very good practices involved.

null 9 Oct 30, 2021
Drawing app written with Jetpack Compose Canvas

✏️?? Drawing app written with Jetpack Compose Canvas. Draw using touch down, move and up events.Using array of paths to have erase, undo, or redo actions and set properties for path that will be drawn next separately.

Smart Tool Factory 30 Nov 10, 2022
A kotlin drawing application for all ages

DrawingApp An android drawing application for all ages. It comes with 5 different brush sizes, includes color picker using Spectrum library, undo and

Oksana Tkachenko 3 Apr 12, 2022
Android app that helps you keep track of the medical supplements you need to take and how you spend your days

Android app that helps you keep track of the medical supplements you need to take and how you spend your days, similar to a bullet journal. It also allows you to reflect on your day, week, year, etc.

Rachelle Hu 4 Nov 10, 2022
AnimApp is an app that recommends you random anime and you can add it to your favourite if you like it.

papb-team6 AnimApp is an app that recommends you animes and you can add it to your favourite if you like it. Team members: Firdaus Bisma Suryakusuma (

Gilang Adhitama Putra 1 Mar 9, 2022
A simple and minimal app to track how long you've been sober from anything you want.

Sobriety A simple and minimal app to track how long you've been sober from anything you want. I mostly designed this out of spite for "I Am Sober", wh

Katherine Rose 26 Nov 21, 2022
Easy-Note - Easy Note Application will help user to add and update their important notes

Easy-Note ??️ Easy Note App helps you to create your notes. You can ?? edit and

Ade Amit 0 Jan 30, 2022