GithubHelp home page GithubHelp logo

scratchview's People

Contributors

ben-j69 avatar sharish avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scratchview's Issues

Can't Revel 100%

can not revel 100% in one touch.
in PhonePe and Tez if we reveal 30% then we touch out of scrachview it will automatically reveal 100% so how can I revel 100% in this scratch card?

can not set imageresource

can not set image resource programetically, if remove src from xml file and try to set src programetically using "scratchimageview.setimageresource" it displays nothing

Get percentage of the whole scratch area

Hi and thank you for this library, it's very helpful!
But I have a question, can we get the percentage or check if the whole scratch area is revealed? as for now, we only can detect the percentage of the text/image area inside the scratch view. Any help would be appreciated! Thank you very much

AsyncTask Deprecation

Hello, in ScratchTextView.java, AsyncTask is Deprecated so what can we do about that, i have used Executors many times but here we need params from doInBackground which we can't get from Executors..

Reveal() function doesn't work

When wanna to reveal the component before displaying, we try to call the Reveal function in body of OnCreate() Activity, the app will crash by dint of many exceptions

width and height must be > 0

java.lang.IllegalArgumentException: width and height must be > 0 at android.graphics.Bitmap.createBitmap(Bitmap.java:1074) at android.graphics.Bitmap.createBitmap(Bitmap.java:1041) at android.graphics.Bitmap.createBitmap(Bitmap.java:991) at android.graphics.Bitmap.createBitmap(Bitmap.java:952) at com.cooltechworks.views.ScratchTextView.onSizeChanged(ScratchTextView.java:175) at android.view.View.sizeChange(View.java:22602) at android.view.View.setFrame(View.java:22544) at android.widget.TextView.setFrame(TextView.java:7137) at android.view.View.layout(View.java:22404) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656) at android.widget.LinearLayout.onLayout(LinearLayout.java:1565) at android.view.View.layout(View.java:22407) at android.view.ViewGroup.layout(ViewGroup.java:6589) at androidx.viewpager.widget.ViewPager.onLayout(ViewPager.java:1775) at android.view.View.layout(View.java:22407) at android.view.ViewGroup.layout(ViewGroup.java:6589) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656) at android.widget.LinearLayout.onLayout(LinearLayout.java:1565) at android.view.View.layout(View.java:22407) at android.view.ViewGroup.layout(ViewGroup.java:6589) at androidx.constraintlayout.widget.ConstraintLayout.onLayout(ConstraintLayout.java:1915) at android.view.View.layout(View.java:22407) at android.view.ViewGroup.layout(ViewGroup.java:6589) at androidx.coordinatorlayout.widget.CoordinatorLayout.layoutChild(CoordinatorLayout.java:1193) at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayoutChild(CoordinatorLayout.java:880) at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:899) at android.view.View.layout(View.java:22407) at android.view.ViewGroup.layout(ViewGroup.java:6589) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:22407) at android.view.ViewGroup.layout(ViewGroup.java:6589) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656) at android.widget.LinearLayout.onLayout(LinearLayout.java:1565) at android.view.View.layout(View.java:22407) at android.view.ViewGroup.layout(ViewGroup.java:6589) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:22407) at android.view.ViewGroup.layout(ViewGroup.java:6589) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656) at android.widget.LinearLayout.onLayout(LinearLayout.java:1565) at android.view.View.layout(View.java:22407) at android.view.ViewGroup.layout(ViewGroup.java:6589) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at com.android.internal.policy.DecorView.onLayout(DecorView.java:1075) at android.view.View.layout(View.java:22407)

Re-draw

HI,
How can i re-draw the scrachable layer?

Tiled Images

I have noticed that in Android Oreo the scratch image is being tile.

Is there a fix for this?

Need to tap the image to reveal instead of scratching the surface.

I created a ScratchImageView and a ScratchTextView. In order to reveal the content, I had to tap over the image and this is not equivalent to shown behaviour of scratching the image as shown on DemoScreen.

Am I missing on something or this is the actual behaviour?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.