{"id":18565091,"url":"https://github.com/jenly1314/giftsurfaceview","last_synced_at":"2025-10-25T11:07:37.739Z","repository":{"id":72501285,"uuid":"86567785","full_name":"jenly1314/GiftSurfaceView","owner":"jenly1314","description":"🌷 直播间送礼物拼图案动画控件","archived":false,"fork":false,"pushed_at":"2025-05-12T15:03:56.000Z","size":8776,"stargazers_count":239,"open_issues_count":2,"forks_count":43,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-20T12:07:29.989Z","etag":null,"topics":["android","animation","effects","gift","giftview","give","hallostar","holder","live","move","room","rose","surface","surfaceview"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jenly1314.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2017-03-29T10:13:38.000Z","updated_at":"2025-05-12T15:03:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"7b309341-2dd5-4bba-b7e6-f20f44271d48","html_url":"https://github.com/jenly1314/GiftSurfaceView","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jenly1314/GiftSurfaceView","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenly1314%2FGiftSurfaceView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenly1314%2FGiftSurfaceView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenly1314%2FGiftSurfaceView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenly1314%2FGiftSurfaceView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jenly1314","download_url":"https://codeload.github.com/jenly1314/GiftSurfaceView/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenly1314%2FGiftSurfaceView/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280943394,"owners_count":26417747,"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","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["android","animation","effects","gift","giftview","give","hallostar","holder","live","move","room","rose","surface","surfaceview"],"created_at":"2024-11-06T22:17:44.182Z","updated_at":"2025-10-25T11:07:37.732Z","avatar_url":"https://github.com/jenly1314.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GiftSurfaceView\n\n[![JitPack](https://img.shields.io/jitpack/v/github/jenly1314/GiftSurfaceView?logo=jitpack)](https://jitpack.io/#jenly1314/GiftSurfaceView)\n[![Download](https://img.shields.io/badge/download-APK-brightgreen?logo=github)](https://raw.githubusercontent.com/jenly1314/GiftSurfaceView/master/app/app-release.apk)\n[![API](https://img.shields.io/badge/API-15%2B-brightgreen?logo=android)](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)\n[![License](https://img.shields.io/github/license/jenly1314/GiftSurfaceView?logo=open-source-initiative)](https://opensource.org/licenses/mit)\n\n\nGiftSurfaceView 最初出自于2014年开发HalloStar项目时所写，主要用于HalloStar项目直播间的送礼物动画。现在想来，那夕阳下的奔跑，是我逝去的青春。因高仿全民TV项目时想起，所以抽空整理了下，以此记录。\n\n## 效果展示\n\n![gif](GIF.gif)\n\n\u003e 你也可以直接下载 [演示App](https://raw.githubusercontent.com/jenly1314/GiftSurfaceView/master/app/app-release.apk) 体验效果\n\n## 引入\n\n### Gradle:\n\n1. 在Project的 **build.gradle** 或 **setting.gradle** 中添加远程仓库\n\n    ```gradle\n    repositories {\n        //...\n        mavenCentral()\n        maven { url 'https://jitpack.io' }\n    }\n    ```\n\n2. 在Module的 **build.gradle** 中添加依赖项\n\n    ```gradle\n    implementation 'com.github.jenly1314:GiftSurfaceView:1.1.0'\n    ```\n\n## 使用\n\n代码示例\n```Java\n    public void updateGiftSurfaceView(int type){\n\n        frame.removeAllViews();\n\n        GiftSurfaceView giftSurfaceView = new GiftSurfaceView(context);\n        if(type == RANDOM){\n            giftSurfaceView.setImageResource(R.drawable.rose);\n        }else{\n            giftSurfaceView.setImageBitmap(bitmap,.5f);\n        }\n\n        giftSurfaceView.setPointScale(1,width/10,(int)(height/3.8f));\n        giftSurfaceView.setRunTime(10000);\n\n        try {\n\n            switch (type){\n                case RANDOM:\n                    giftSurfaceView.setRandomPoint(9);\n                    break;\n                case V:\n                    giftSurfaceView.setListPoint(PointUtils.getListPointByResourceJson(context,ASSET_V),true);\n                    break;\n                case HEART:\n                    giftSurfaceView.setListPoint(PointUtils.getListPointByResourceJson(context,ASSET_HEART),true);\n                    break;\n                case LOVE:\n                    giftSurfaceView.setListPoint(PointUtils.getListPointByResourceJson(context,ASSET_LOVE));\n                    break;\n                case SMILE:\n                    giftSurfaceView.setListPoint(PointUtils.getListPointByResourceJson(context,ASSET_SMILE));\n                    break;\n                case X:\n                    giftSurfaceView.setListPoint(PointUtils.getListPointByResourceJson(context,ASSET_X));\n                    break;\n                case V520:\n                    giftSurfaceView.setListPoint(PointUtils.getListPointByResourceJson(context,ASSET_V520));\n                    break;\n                case V1314:\n                    giftSurfaceView.setRunTime(GiftSurfaceView.LONG_TIME);\n                    giftSurfaceView.setListPoint(PointUtils.getListPointByResourceJson(context,ASSET_V1314));\n                    break;\n\n            }\n            frame.addView(giftSurfaceView);\n        } catch (IOException e) {\n            e.printStackTrace();\n        }\n\n\n    }\n```\n\n更多使用详情，请查看[app](app)中的源码使用示例或直接查看[API帮助文档](https://jitpack.io/com/github/jenly1314/GiftSurfaceView/latest/javadoc/)\n\n\n## 相关推荐\n- [FlutteringLayout](https://github.com/jenly1314/FlutteringLayout) 一个适用于直播间点赞桃心飘动效果的控件。\n- [SpinCounterView](https://github.com/jenly1314/SpinCounterView) 一个类似码表变化的旋转计数器动画控件。\n- [CounterView](https://github.com/jenly1314/CounterView) 一个数字变化效果的计数器视图控件。\n- [RadarView](https://github.com/jenly1314/RadarView) 一个雷达扫描动画后，然后展示得分效果的控件。\n- [SuperTextView](https://github.com/jenly1314/SuperTextView) 一个在TextView的基础上扩展了几种动画效果的控件。\n- [LoadingView](https://github.com/jenly1314/LoadingView) 一个圆弧加载过渡动画，圆弧个数，大小，弧度，渐变颜色，完全可配。\n- [WaveView](https://github.com/jenly1314/WaveView) 一个水波纹动画控件视图，支持波纹数，波纹振幅，波纹颜色，波纹速度，波纹方向等属性完全可配。\n- [DragPolygonView](https://github.com/jenly1314/DragPolygonView) 一个支持可拖动多边形，支持通过拖拽多边形的角改变其形状的任意多边形控件。\n- [CircleProgressView](https://github.com/jenly1314/CircleProgressView) 一个圆形的进度动画控件，动画效果纵享丝滑。\n- [ArcSeekBar](https://github.com/jenly1314/ArcSeekBar) 一个弧形的拖动条进度控件，配置参数完全可定制化。\n- [DrawBoard](https://github.com/jenly1314/DrawBoard) 一个自定义View实现的画板；方便对图片进行编辑和各种涂鸦相关操作。\n- [compose-component](https://github.com/jenly1314/compose-component) 一个Jetpack Compose的组件库；主要提供了一些小组件，便于快速使用。\n\n---\n\n![footer](https://jenly1314.github.io/page/footer.svg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenly1314%2Fgiftsurfaceview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjenly1314%2Fgiftsurfaceview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenly1314%2Fgiftsurfaceview/lists"}