My Android application allows user to open an image, create marks at the specific areas (a visual clue) for which they can separately add notes and exchange within their team.
E.g. To finalize on a construction plan the app allows to open the proposed plan as bitmap, where the management could suggest the modification by marking on the specific sections and add respective notes.
The requirement is, user should get a choice to pick a pattern to be drawn on his finger move.
What are the options Android provide to draw a pattern?
For your reference just look this following image.
I want to draw one of the above pattern on finger touch.
With this code you can draw with finger in canvas.
Then add you must add shader to your Paint object to draw patterns like yours.
mPatternBitmap = BitmapFactory.decodeResource(getResources(), pPatternId);
mBitmapShader = new BitmapShader(mPatternBitmap, Shader.TileMode.REPEAT, Shader.TileMode.REPEAT);
mPaint.setShader(mBitmapShader);
Where pPatternId is your patterns image id from res.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With