Android Scratch Card View

Android Scratch Card View


ScratchView repo is UX Design involving scratch cards like views which are scratched to reveal the information they conceal. There are two types of ScratchView

  • ScratchRelativeLayoutView
    • A Child of RelativeLayout which conceals a relative layout. Scratching over the view will reveal the hidden RelativeLayout. Also the scratch-able view is a RelativeLayout.
  • ScratchImageView
    • A Child of ImageView which conceals the image. Scratching over the view will reveal the hidden image.
  • ScratchTextView
    • A Child of TextView which conceals the text. Scratching over the view will reveal the hidden text.

Demo Screen


Useful Methods

Both the views have following three methods which are useful to reveal or determine whether revealed and listener during revealing the hidden text/image.

  • isRevealed() – tells whether the text/image has been revealed.
  • reveal() – reveals the image/text if not revealed yet.
  • setRevealListener(IRevealListener) – a callback listener interface which gets called back when user reveals the text/image through onReveal() method.








Adding to your project

  • Add the following configuration in your build.gradle file.


Special Thanks
9 forks.
56 stars.
0 open issues.
Recent commits:

  • ,
  • ,
  • ,
  • ,
  • ,

 4,061 total views,  12 views today

(Visited 1,912 times, 2 visits today)

You May Also Like

About the Author: Android Developer

This is Mohammad I am Android Application Developer. I am the founder of Android Tutorial Online blog. I am programming lover and professional blogger from India. I spend most of my time doing programming and helping other programmers. This Android tutorial online blog for learning and share Android code.
My Chatbot
Powered by Replace Me