This repository has been archived by the owner on Mar 26, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 53
/
params.json
6 lines (6 loc) · 3.15 KB
/
params.json
1
2
3
4
5
6
{
"name": "Drawingview (Android)",
"tagline": "DrawingView is a simple view that lets you draw on screen using your fingers and lets you save the drawings as images.",
"body": "<h1 align=\"center\">DrawingView-Android</h1>\r\n<p align=\"center\">\r\n <a href=\"https://android-arsenal.com/api?level=9\"> <img src=\"https://img.shields.io/badge/API-9%2B-blue.svg?style=flat\" /></a>\r\n <a href=\"https://jitpack.io/#mukeshsolanki/DrawingView-Android\"> <img src=\"https://jitpack.io/v/mukeshsolanki/DrawingView-Android.svg\" /></a>\r\n <a href=\"http://android-arsenal.com/details/1/4042\"> <img src=\"https://img.shields.io/badge/Android%20Arsenal-DrawingView--Android-brightgreen.svg?style=flat\" /></a>\r\n <a href=\"https://travis-ci.org/mukeshsolanki/DrawingView-Android\"> <img src=\"https://travis-ci.org/mukeshsolanki/DrawingView-Android.svg?branch=master\" /></a>\r\n <a href=\"https://www.paypal.me/mukeshsolanki\"> <img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" /></a>\r\n <br /><br />\r\n DrawingView is a simple view that lets you draw on screen using your fingers and lets you save the drawings as images.\r\n</p>\r\n\r\n<img src=\"https://raw.githubusercontent.com/mukeshsolanki/DrawingView-Android/master/ScreenShoot.gif\" />\r\n\r\n## Getting started\r\n\r\nIts really simple to integrate *DrawingView* in android. All you need to do make the following change to you build gradle.\r\n\r\nStep 1. Add the JitPack repository to your build file. Add it in your root build.gradle at the end of repositories:\r\n\r\n```java\r\nallprojects {\r\n repositories {\r\n ...\r\n maven { url \"https://jitpack.io\" }\r\n }\r\n}\r\n```\r\nStep 2. Add the dependency\r\n```java\r\ndependencies {\r\n compile 'com.github.mukeshsolanki:DrawingView-Android:1.0.2'\r\n}\r\n```\r\n## How to use DrawingView\r\n\r\nIts 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.\r\n\r\n```XML\r\n<com.mukesh.DrawingView\r\n android:id=\"@+id/scratch_pad\"\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"match_parent\"\r\n android:layout_above=\"@+id/buttons\"\r\n />\r\n```\r\n\r\nand reference it in your activity/fragment and assign the DrawingView like wise.\r\n```Java\r\nDrawingView drawingView = (DrawingView) findViewById(R.id.scratch_pad);\r\ndrawingView.initializePen(); //To use the pen mode to draw on the screen\r\ndrawingView.initializeEraser(); //To use the eraser mode to clear the screen\r\ndrawingView.setBackgroundColor(@ColorInt int color); //To set the background color of the drawing view\r\ndrawingView.setEraserSize(float size); //To set the size of the eraser\r\ndrawingView.setPenSize(float size); //To set the size of the pen\r\ndrawingView.setPenColor(@ColorInt int color); //To set the color of the pen\r\ndrawingView.saveImage(String filePath, String filename, Bitmap.CompressFormat format, int quality); //To save the image after your done drawing\r\ndrawingView.loadImage(Bitmap bitmap); //Load image (your saved drawing)\r\n```\r\n",
"note": "Don't delete this file! It's used internally to help with page regeneration."
}