{"id":13608815,"url":"https://github.com/chillibits/drawing-activity","last_synced_at":"2025-04-12T17:33:01.344Z","repository":{"id":47664882,"uuid":"147334284","full_name":"chillibits/drawing-activity","owner":"chillibits","description":"Android library for getting lightweight DrawingActivity into your Android app","archived":true,"fork":false,"pushed_at":"2021-08-23T17:17:58.000Z","size":21136,"stargazers_count":67,"open_issues_count":2,"forks_count":12,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-11-07T14:42:11.689Z","etag":null,"topics":["android","android-library","chillibits","draw","drawing"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chillibits.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["marcauberer"],"custom":"https://www.paypal.me/marcauberer"}},"created_at":"2018-09-04T11:16:36.000Z","updated_at":"2024-06-27T09:36:06.000Z","dependencies_parsed_at":"2022-08-21T09:40:35.039Z","dependency_job_id":null,"html_url":"https://github.com/chillibits/drawing-activity","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chillibits%2Fdrawing-activity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chillibits%2Fdrawing-activity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chillibits%2Fdrawing-activity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chillibits%2Fdrawing-activity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chillibits","download_url":"https://codeload.github.com/chillibits/drawing-activity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248605358,"owners_count":21132159,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-library","chillibits","draw","drawing"],"created_at":"2024-08-01T19:01:30.200Z","updated_at":"2025-04-12T17:32:56.333Z","avatar_url":"https://github.com/chillibits.png","language":"Kotlin","funding_links":["https://github.com/sponsors/marcauberer","https://www.paypal.me/marcauberer"],"categories":["Kotlin"],"sub_categories":[],"readme":"# Android DrawingActivity\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/88a25db5ab6c4c44b440814778de4236)](https://app.codacy.com/gh/ChilliBits/drawing-activity?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=ChilliBits/drawing-activity\u0026utm_campaign=Badge_Grade_Dashboard)\n![Android CI](https://github.com/ChilliBits/drawing-activity/workflows/Android%20CI/badge.svg)\n[![](https://jitpack.io/v/ChilliBits/drawing-activity.svg)](https://jitpack.io/#ChilliBits/drawing-activity)\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-DrawingActivity-blue.svg?style=flat)](https://android-arsenal.com/details/1/7098)\n[![API](https://img.shields.io/badge/API-19%2B-red.svg?style=flat)](https://android-arsenal.com/api?level=19)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n\nA lightweight android library for including a drawing experience to your Android app.\n\n![1](https://chillibits.com/github-media/DrawingActivity/1_small.png)\n![2](https://chillibits.com/github-media/DrawingActivity/2_small.png)\n![3](https://chillibits.com/github-media/DrawingActivity/3_small.png)\n\n## Installation\nUp to now, the library is only available on JitPack. Please add this code to your build.gradle file on project level:\n```gradle\nallprojects {\n  repositories {\n    ...\n    maven { url 'https://jitpack.io' }\n  }\n}\n```\nTo load the library into your project use this code in the build.gradle file within the app module:\n```gradle\nimplementation 'com.github.ChilliBits:drawing-activity:2.0.8'\n```\n\n## Usage\nTo use the DrawingActivity, include this code in an event function:\n```kotlin\nDrawingActivityBuilder.getInstance(this@MainActivity)\n\t.draw(REQ_DRAWING)\n```\nThus `REQ_DRAWING` is a constant of type integer to specify the request code of the returning intent for the `onActivityResult` method.\n\nIf you want to have a look onto a implemented example, view the [MainActivity.kt](https://github.com/ChilliBits/splash-screen/blob/master/app/src/main/java/com/chillibits/splashscreenexample/MainActivity.kt) or the [MainActivity.java](https://github.com/ChilliBits/splash-screen/blob/master/app/src/main/java/com/chillibits/splashscreenexample/MainActivityJava.java) file.\n\nYou are able to catch the event of finishing the drawing and closing the DrawingActivty by using the `onActivityResult` method like that:\n```kotlin\nif(requestCode == REQ_DRAWING \u0026\u0026 resultCode == RESULT_OK \u0026\u0026 data != null) {\n    val drawingPath = data.getStringExtra(DrawingActivity.DRAWING_PATH)\n    Toast.makeText(this, drawingPath, Toast.LENGTH_LONG).show()\n}\n```\nReplace the Toast with your own code, processing the returned image (loading the image into your app, sharing it, cropping it, etc.).\n\nYou can customize the appearance of the DrawingActivity using following arguments when building the Activity with `DrawingActivityBuilder`:\n\n| Method                         | Description                                                                                                                                                                                                                                        |\n|--------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| enableToast(boolean enabled)   | Enables or disables the toast on Activity startup (You can see the toast on the animated demo above).                                                                                                                                              |\n| setTitle(String title)         | Sets the title in the toolbar at the top of the DrawingActivity.                                                                                                                                                                                   |\n| setDefaultUtility(int utility) | Sets the default utility which will be selected on Activity startup. You have to pass an int argument to this method. The utility constants can be accessed by using e.g. `DrawingActivity.UTILITY_PENCIL` or `DrawingActivity.UTILITY_AIR_BRUSH`. |\n\n## Credits\nThis library uses following third party libraries:\n*   [DrawingView](https://github.com/Raed-Mughaus/DrawingView) (Repo does not exist anymore)\n*   [SlidingUpPanel](https://github.com/umano/AndroidSlidingUpPanel)\n*   [ColorPickerPreference](https://github.com/attenzione/android-ColorPickerPreference)\n*   [Android FilePicker](https://github.com/DroidNinja/Android-FilePicker)\n*   [Glide](https://github.com/bumptech/glide)\n\n## Contributions\nIf you want to contribute to this library, feel free to open a pr! We're going to merge it asap.\n\nThank you for using the DrawingActivity!\n\n© ChilliBits 2018-2021 (Designed and developed by Marc Auberer)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchillibits%2Fdrawing-activity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchillibits%2Fdrawing-activity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchillibits%2Fdrawing-activity/lists"}