Scratch Card : Scratch your image

Short description

Helps you scratch a image and reveal your component behind :cat:

Picture of all the blocks

Instructions to use extension

Some properties like overlay width, overlay height, overlay image and tile mode should be set before setting up scratch card in your layout.

Docs

![|64x64](upload://cZs6WscT191mYVEU7cTNTo4g19p.png) Scratch Card | Free

A extension that helps you making a scratch card on top of an arrangement.

📦 12.86 KB
📁 com.aktech.scratchcard.ScratchCard

Properties

TileMode text Set the tile mode of the scratch card. Default is CLAMP others are REPEAT and MIRROR. Property to be set before setting up view.
StrokeWidth number Set the width of the stroke using which image will be scratched.
OverlayWidth number Set width of the overlay pattern. Property to be set before setting up view.
OverlayImage text Set the overlay image which is to be scratched. Property to be set before setting up view.
OverlayHeight number Set height of the overlay pattern. Property to be set before setting up view.

Blocks

Mask

Covers your layout back with image.

RevealPercent

Returns the current revealed image percent.

returnType : number

SetEraserMode

Sets the mode to erase.

IsRevealed

Checks if the image is revealed or not.

Setup

Setups your scratch card with properties set before.

layout component

Reveal

Removes the masked image from your layout.

OnRevealPercentChanged

Triggers when user scratches the scratch card.

percent number

OnRevealed

Triggers when image is revealed.

whenScratchCard ▾.OnRevealeddo

Thank you

:point_down:t4: Download Extension

Demo Blocks

Aia -
scratch.aia (27.4 KB)
Apk -
scratch.apk (5.2 MB)

Demo Video

Download link

com.aktech.scratchcard.aix (12.9 KB)

2nd download link - Extension Scratch Card | Free

Credits

This extension is made on the ScratchView library by Anup Kumar Panwar

27 Likes

Greate Extension :partying_face:

1 Like

Thank you @Victor_Ken :relaxed:

Nice work​:ok_hand:

1 Like

Thank you @Janidu

1 Like

Most awaited extension along with percentage…

You are always Rocking

:heart:

2 Likes

Thank you @Still-learning

@luv.ak.tech Thanks for this extension, :heart_eyes:

1 Like

Your welcome @Nami_Chand and thank for comment :smiley:

2 Likes

Just awesome :boom::boom:

1 Like

Thank you @techhamara91

1 Like

Mind blowing ! :exploding_head:
But as always, u forgot to mention the library name.

1 Like

Thank you so much

added

1 Like

Thumbs up :+1:
Great job, Keep rocking!!!

1 Like

Thank you @devcafeofficial

1 Like

Docs updated and 2nd download link with getaix.com by Jerin_Jacob

Its a very nice extension, however after tens of scratches, the app will start to slow down and may consume to much memory. Touch screen gets slower and slower and finally unusable.
Can you please add there a hard memory purge or a reset? Some part of the code needs fixing.

i am not sure if this is possible nor anywhere it states that where to achieve these things

I checked to use two separate vertical arrangements but slowly freezing usability will follow. Basically, app needs to restarted and the scratch is working fast and smoothly but over the time it will slow down significantly. Some part of it may leave images in the memory perhaps and when there are coming more, the extension starts to struggle. Or it might be more complicated issues with the touch screen setup?

SetEraserMode is not helping or solving the issues, nor does Reveal.

It would need some sort of Clear -command, which would put the ScratchCard state to the early app starting point, flush all the cards etc (i don’t exactly know what happens in the background or where these images are stored).

But I feel that all the serial scratches are still on the card screen, somewhere behind others and app is then having around 100 pictures in the same screen and then android is starting to struggle.

I would try to make a disable cmd but not sure when cause currently i have exams and they would end at the end of month