我正在做一个游戏,用户需要抓取一张卡片,并找出隐藏了什么类型的图像,为此,图像应该只被抓取一次,而抓取的卡片存储在内存中,我该怎么做呢?
我找到了很多创建刮刮卡的代码,但没有一个能保存刮刮卡。
这是我发现的:
https://github.com/D-clock/ScratchView
https://github.com/myinnos/AndroidScratchCard
https://github.com/skymansandy/scratchCardLayout
How to create a Scratch Card in Android?
How to create scratch card which allows user to scratch only once
感谢您的支持:)
发布于 2020-07-01 21:39:00
根据从内存中获取的scratch状态,您可以将视图设置为scratchable或scratchable。
看看这个库。https://github.com/skymansandy/scratchCardLayout
最新的更新有一个额外的接口revealScratch()。这和resetScratch()正好服务于您的用例。
https://stackoverflow.com/questions/59693186
复制相似问题