Skip to content

Instantly share code, notes, and snippets.

View CallumCoombes's full-sized avatar
🚀
Focusing

Callum Coombes CallumCoombes

🚀
Focusing
View GitHub Profile
@CallumCoombes
CallumCoombes / FingerPaintImageView.java
Created June 26, 2018 09:10
ImageView to allow users to paint on image with their finger and add a cross image on a painted area.
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.RectF;
import android.graphics.drawable.BitmapDrawable;
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:animateLayoutChanges="true"
android:background="#E8ECEE"
tools:context="apps.cal.lonesafe.CreateTaskFragment.CreateTaskView">