{"id":22018737,"url":"https://github.com/rhcad/vgplay-android","last_synced_at":"2026-04-28T21:04:50.007Z","repository":{"id":18242963,"uuid":"21392361","full_name":"rhcad/vgplay-android","owner":"rhcad","description":"A vector shape playing and animation framework based for Android.","archived":false,"fork":false,"pushed_at":"2017-01-17T07:33:52.000Z","size":9354,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"demo","last_synced_at":"2025-01-28T16:18:12.492Z","etag":null,"topics":["android","animation-framework","touchvg"],"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/rhcad.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}},"created_at":"2014-07-01T15:12:53.000Z","updated_at":"2018-01-02T03:04:40.000Z","dependencies_parsed_at":"2022-08-04T23:16:17.079Z","dependency_job_id":null,"html_url":"https://github.com/rhcad/vgplay-android","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhcad%2Fvgplay-android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhcad%2Fvgplay-android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhcad%2Fvgplay-android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhcad%2Fvgplay-android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhcad","download_url":"https://codeload.github.com/rhcad/vgplay-android/tar.gz/refs/heads/demo","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245081967,"owners_count":20557876,"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":["android","animation-framework","touchvg"],"created_at":"2024-11-30T05:13:57.152Z","updated_at":"2026-04-28T21:04:49.997Z","avatar_url":"https://github.com/rhcad.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TouchVGPlay Demo for Android\n\nThis is a unit test and example project for [TouchVGPlay][vgplay], which is a lightweight vector shape playing and animation framework based on TouchVG for Android.\n\nAPI (rhcad.vgplay.PlayingHelper):\n\n```Java\n// 图形播放管理类: 每个绘图视图对象(IGraphView)可有一个 PlayingHelper 对象.\npublic class PlayingHelper {\n    public static final int FRAMEFLAGS_DYN = 8;\n\n    // 播放结束的通知\n    public static interface OnPlayEndedListener {\n        // 播放完成，待用户结束播放: 返回false表示不拦截，true表示暂停在最后一帧，\n        // 后续由应用来调用 stopPlay()\n        public boolean onPlayWillEnd(IGraphView view);\n\n        // 播放结束，应用可更新界面布局、销毁附加的 extra 对象\n        public void onPlayEnded(IGraphView view, int tag, Object extra);\n    }\n\n    // 播放源接口，由应用提供显示内容\n    public static interface PlayProvider {\n        // 向动态图形列表(hShapes)提供当前帧的图形内容.\n        // 返回: 0表示当前时刻还没有新帧，负数表示播放结束，正数表示已填充当前帧图形\n        public int provideFrame(IGraphView view, int tag, Object extra,\n                                int hShapes, int tick, int lastTick);\n\n        // 播放结束，应用可更新界面布局、销毁附加的 extra 对象\n        public void onPlayEnded(IGraphView view, int tag, Object extra);\n    }\n\n    // 指定视图的构造函数，每个绘图视图对象可有一个 PlayingHelper 对象\n    public PlayingHelper(IGraphView view);\n\n    // 得到本库的版本号\n    public static String getVersion();\n\n    // 添加播放结束的观察者，在 startPlay() 和 stopPlay() 之间回调\n    public void setOnPlayEndedListener(OnPlayEndedListener listener);\n\n    // 停止所有播放项，包含 startPlay/startSyncPlay/addPlayProvider 对应项\n    public void stop();\n\n    // 开始播放指定的目录下录制的图形\n    public boolean startPlay(String path);\n\n    // 停止播放\n    public void stopPlay();\n\n    // 暂停播放\n    public boolean playPause();\n\n    // 继续播放\n    public boolean playResume();\n\n    // 返回已播放的相对毫秒数\n    public int getPlayTicks();\n\n    // 开始同步播放，待播放的图形将缓存在指定的目录\n    public boolean startSyncPlay(int cid, String path);\n\n    // 同步播放一帧，此帧(*.vgr)已缓存到指定的目录\n    public void applySyncPlayFrame(int cid, int index);\n\n    // 停止同步播放\n    public void stopSyncPlay(int cid);\n\n    // 停止所有同步播放\n    public void stopSyncPlayings();\n\n    // 添加播放源，可指定应用所需的附加对象\n    public boolean addPlayProvider(PlayProvider p, int tag, Object extra);\n\n    // 返回播放项的个数\n    public int getPlayProviderCount();\n\n    // 停止所有播放项\n    public void stopProviders();\n}\n```\n\n## How to Compile\n\n- Import and run the VGPlayTest project in eclipse.\n\n  - Android SDK version of the projects may need to modify according to your installation.\n  \n  - Recommend using the newer [ADT Bundle](http://developer.android.com/sdk/index.html) to avoid complex configuration.\n\n## How to Contribute\n\nContributors and sponsors are welcome. You may translate, commit issues or pull requests on this Github site.\nTo contribute, please follow the branching model outlined here: [A successful Git branching model](http://nvie.com/posts/a-successful-git-branching-model/).\n\n## License\n\nThis is an open source BSD licensed project. It uses the following open source projects:\n\n- [vgandroid](https://github.com/rhcad/vgandroid) (BSD): Vector drawing framework for Android.\n- [vgcore](https://github.com/rhcad/vgcore) (BSD): Cross-platform vector drawing libraries using C++.\n- [TouchVGPlay][vgplay] (GPL): Shape playing and animation framework based on TouchVG.\n\n[vgplay]: https://github.com/rhcad/vgplay\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhcad%2Fvgplay-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhcad%2Fvgplay-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhcad%2Fvgplay-android/lists"}