{"id":22017682,"url":"https://github.com/myinnos/androidscratchcard","last_synced_at":"2025-04-05T23:08:46.533Z","repository":{"id":80788186,"uuid":"156167560","full_name":"myinnos/AndroidScratchCard","owner":"myinnos","description":"Light Weighted Scratch Card View Library for Android","archived":false,"fork":false,"pushed_at":"2022-05-25T04:38:31.000Z","size":810,"stargazers_count":224,"open_issues_count":6,"forks_count":32,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-29T22:06:45.874Z","etag":null,"topics":["andorid","androidlibrary","scratchcard"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/myinnos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":["myinnos"],"custom":["https://www.paypal.me/fansfolio"]}},"created_at":"2018-11-05T05:55:03.000Z","updated_at":"2024-10-31T07:06:04.000Z","dependencies_parsed_at":"2023-06-03T03:30:16.716Z","dependency_job_id":null,"html_url":"https://github.com/myinnos/AndroidScratchCard","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myinnos%2FAndroidScratchCard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myinnos%2FAndroidScratchCard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myinnos%2FAndroidScratchCard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myinnos%2FAndroidScratchCard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/myinnos","download_url":"https://codeload.github.com/myinnos/AndroidScratchCard/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411234,"owners_count":20934653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["andorid","androidlibrary","scratchcard"],"created_at":"2024-11-30T05:07:28.422Z","updated_at":"2025-04-05T23:08:46.501Z","avatar_url":"https://github.com/myinnos.png","language":"Java","readme":"# Android Scratchcard\nLight Weighted Scratchcard View Library for Android\n\n ![AndroidScratchCard - Example](https://raw.githubusercontent.com/myinnos/AndroidScratchCard/master/images-gif/androidscratchcard-example.gif)\n  \n#### Kindly use the following links to use this library:\n\nIn build.gradle (Project)\n```java\nallprojects {\n    repositories {\n        ...\n        maven { url \"https://jitpack.io\" }\n    }\n}\n```\nAnd then in the other gradle file(may be your app gradle or your own module library gradle, but never add in both of them to avoid conflict.)\n```java\ndependencies {\n    // AppCompat version\n\t  implementation 'com.github.myinnos:AndroidScratchCard:v1.0'\n}\n```          \nHow to use\n-----\n**Step 1:** add this to your xml:\n```xml\n \u003cRelativeLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\u003e\n\n        \u003cTextView\n            android:id=\"@+id/textView\"\n            android:layout_width=\"240dp\"\n            android:layout_height=\"150dp\"\n            android:layout_centerInParent=\"true\"\n            android:text=\"YOU EARNED 20\" /\u003e\n  \n        \u003cin.myinnos.androidscratchcard.ScratchCard\n            android:id=\"@+id/scratchCard\"\n            android:layout_width=\"240dp\"\n            android:layout_height=\"150dp\"\n            android:layout_centerInParent=\"true\"/\u003e\n\n    \u003c/RelativeLayout\u003e\n```\n**Step 2:** implement setOnScratchListener to Play with Listener.\n```java\nprivate ScratchCard mScratchCard;\n\n.....\n    \nmScratchCard = (ScratchCard) findViewById(R.id.scratchCard);\nmScratchCard.setOnScratchListener(new ScratchCard.OnScratchListener() {\n    @Override\n    public void onScratch(ScratchCard scratchCard, float visiblePercent) {\n         if (visiblePercent \u003e 0.3) {\n             mScratchCard.setVisibility(View.GONE);\n             Toast.makeText(MainActivity.this, \"Content Visible\", Toast.LENGTH_SHORT).show();\n          }\n     }\n});\n    \n```\n##### Any Queries? or Feedback, please let me know by opening a [new issue](https://github.com/myinnos/AndroidScratchCard/issues/new)!\n\n## Contact\n#### Prabhakar Thota\n* :globe_with_meridians: Website: [myinnos.in](http://www.myinnos.in \"Prabhakar Thota\")\n* :email: e-mail: contact@myinnos.in\n* :mag_right: LinkedIn: [PrabhakarThota](https://www.linkedin.com/in/prabhakarthota \"Prabhakar Thota on LinkedIn\")\n* :thumbsup: Twitter: [@myinnos](https://twitter.com/myinnos \"Prabhakar Thota on twitter\")    \n* :camera: Instagram: [@prabhakar_t_](https://www.instagram.com/prabhakar_t_/ \"Prabhakar Thota on Instagram\")   \n\n\u003e If you appreciate my work, consider buying me a cup of :coffee: to keep me recharged :metal: by [PayPal](https://www.paypal.me/fansfolio)\n\nLicense\n-------\n\n    Copyright 2017 MyInnos\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","funding_links":["https://github.com/sponsors/myinnos","https://www.paypal.me/fansfolio"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyinnos%2Fandroidscratchcard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmyinnos%2Fandroidscratchcard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyinnos%2Fandroidscratchcard/lists"}