• This repository has been archived on 26/Mar/2022
  • Stars
    star
    237
  • Rank 169,885 (Top 4 %)
  • Language
    Java
  • License
    MIT License
  • Created over 8 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

DrawingView is a simple view that lets you draw on screen using your fingers and lets you save the drawings as images.

DrawingView-Android - deprecated



This library has been deprecated in favor of https://github.com/akshay2211/DrawBox DrawingView is a simple view that lets you draw on screen using your fingers and lets you save the drawings as images.

Demo

Getting started

Its really simple to integrate DrawingView in android. All you need to do make the following change to you build gradle.

Step 1. Add the JitPack repository to your build file. Add it in your root build.gradle at the end of repositories:

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

Step 2. Add the dependency

dependencies {
    implementation 'com.github.mukeshsolanki:DrawingView-Android:<latest-version>'
}

How to use DrawingView

Its fairly simple and straight forward to use DrawingView in you application. Just add the following in your layout where you want to display the DrawingView.

<com.mukesh.DrawingView
  android:id="@+id/scratch_pad"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:layout_above="@+id/buttons"
  />

and reference it in your activity/fragment and assign the DrawingView like wise.

DrawingView drawingView = (DrawingView) findViewById(R.id.scratch_pad);
drawingView.initializePen(); //To use the pen mode to draw on the screen
drawingView.initializeEraser(); //To use the eraser mode to clear the screen
drawingView.setBackgroundColor(@ColorInt int color); //To set the background color of the drawing view
drawingView.setEraserSize(float size); //To set the size of the eraser
drawingView.setPenSize(float size); //To set the size of the pen
drawingView.setPenColor(@ColorInt int color); //To set the color of the pen
drawingView.saveImage(String filePath, String filename, Bitmap.CompressFormat format, int quality); //To save the image after your done drawing
drawingView.loadImage(Bitmap bitmap); //Load image (your saved drawing)
drawingView.clear(); //clear image

Author

Maintained by Mukesh Solanki

Contribution

GitHub contributors

License

MIT License

Copyright (c) 2018 Mukesh Solanki

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

More Repositories

1

android-otpview-pinview

A custom view to enter otp of different sizes used usually in cases of authentication.
Java
704
star
2

MarkdownView-Android

Markdown lets you easily display markdown data in android and its compose ready.
JavaScript
594
star
3

photofilter

A simple easy to use library that lets you edit pictures on the fly with easy. Photo filter lets you apply a large number of filters all while maintaining maximum image quality. Supports Android 2.3 and higher.
Kotlin
469
star
4

country-picker-android

A simple library that displays a beautiful list of all the countries allowing the user to pick the country he wishes and provide details like country code, iso code name,currency and flag.
Java
322
star
5

Android-Tamper-Detector

A simple library that can help you detect if you app is modded or tampered with
Kotlin
175
star
6

liquidrefreshlayout

Liquid Refresh Layout is a simple SwipeToRefresh library that helps you easily integrate SwipeToRefresh and performs simple clean liquid animation
Kotlin
129
star
7

android-proguard-rules

Set of Proguard rules that need to be configured for some frequently used libraries
Groovy
87
star
8

easypermissions-android

A simple library that will remove all the boilerplate code and speed up your work with new Runtime Permissions introduced in Android M.
Java
87
star
9

Google-Places-AutoComplete-EditText

A simple library that can connect your autocomplete edittext to Google places api
Kotlin
74
star
10

snake-game-android

Snake game for Android made with Jetpack Compose
Kotlin
70
star
11

easypreferences

This class simplifies calls to SharedPreferences in a line of code. It can also do more like: saving a list of strings, integers and saving images. All in 1 line of code!
Kotlin
37
star
12

animated-splash-screen

A sample app showcasing how to create cool animated splash screen with jetpack compose and lottie
Kotlin
27
star
13

Prevailer-orientation-support-library-for-Android

Prevailer is a simple android library that helps in preserving object instances across orientation change in android and is JAVA 8 and MVP ready.
Java
17
star
14

otpview-swiftui

OTP/PinView for swift ui
Swift
16
star
15

bundletool-action

This action will help you convert your aab to signed apk file.
JavaScript
12
star
16

mukeshsolanki

2
star
17

News-API-Kotlin

An wrapper for https://newsapi.org/
Kotlin
1
star
18

dev-tools

A gem that removes the hassel of setting up your machine evertime you change to a new development device
Ruby
1
star
19

youtube-examples

All the examples from my YouTube channel
Kotlin
1
star