Search code examples
androidandroid-edittextgesturetouch-eventontouchlistener

How to draw something or write inside EditText Box using a finger but not with keyboard?


enter image description here

In first case : When edittext box is clicked, should open a screen with white color background. In that screen, I would like to draw or write something without using a keyboard. It looks similarly like MS paint but using a finger should achieve this! Once after I completed (writing or drawing) then it should be able to paste the screen (which has user handwriting or drawings) inside edittext box.

So when I see Edittext box, the image (that is screen) will be there with a particular users handwriting. If the screen (similar to MS -paint screen) might looks bigger so via app should be able to minimize or convert the screen as a smaller screen (ie. finally converted as a Image which has users own handwriting or drawings) that fits exactly inside edittext box!

How can I achieve this? Can I achieve this by using Gestures or Canvas?

In Second case: I would like to know what are the possibilities available to display a screen with background color or background image (For an example, I can draw rectangle margins or insert greeting card borders (left, right, top and bottom side corners by cropping and inserting a picture) inside a screen so at middle of the screen, the space will be available to allow the user to write some text like "Happy Birthday" or "Good luck" so on..

 Can refer this Image!  Happy Birthday wishes screen

The writing or drawings should be done using a finger! How can I achieve this and what are the ideas and possibilities to do this via android app?


Solution

  • You probably want some handwriting recognition library to integrate with your app. Try finding out a few existing libraries which you can use on android.