I need to develop a Instant Lottery game app.
I need an idea/procedure to implement Scratchable custom widget similar to instant Lottery Tickets in Android.
The requirement is like, the actual content(secret number) should be covered by some image(which indicates scratch area). When the user touch and scratch the image, the image has to disappear slowly and the background content(secret number) should appear accordingly.
Please let me know the best way to implement this. I am in real need of it.
Thanks in advance.
Since you don’t want the entire
Viewto change its transparency, but only the touched parts of it, you need to draw manually on theCanvas, set the PorterDuff mode on aPaintobject:and
drawwithColor.TRANSPARENTAlso see this thread in the Android developer group: http://groups.google.com/group/android-developers/browse_thread/thread/5b0a498664b17aa0/de4aab6fb7e97e38?lnk=gst&q=erase+transparent#