{"id":18021298,"url":"https://github.com/gcssloop/rotate3danimation","last_synced_at":"2025-03-26T22:30:43.336Z","repository":{"id":31728650,"uuid":"35294586","full_name":"GcsSloop/Rotate3dAnimation","owner":"GcsSloop","description":"基于谷歌官方提供的3D翻转示例进行修改，修复了在不同设备上显示效果差异过大的问题。","archived":false,"fork":false,"pushed_at":"2017-04-18T06:49:29.000Z","size":2139,"stargazers_count":156,"open_issues_count":1,"forks_count":40,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-22T14:22:12.940Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GcsSloop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-08T18:14:26.000Z","updated_at":"2024-11-18T17:53:37.000Z","dependencies_parsed_at":"2022-07-16T00:30:30.123Z","dependency_job_id":null,"html_url":"https://github.com/GcsSloop/Rotate3dAnimation","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/GcsSloop%2FRotate3dAnimation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GcsSloop%2FRotate3dAnimation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GcsSloop%2FRotate3dAnimation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GcsSloop%2FRotate3dAnimation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GcsSloop","download_url":"https://codeload.github.com/GcsSloop/Rotate3dAnimation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245747429,"owners_count":20665790,"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":[],"created_at":"2024-10-30T06:09:29.914Z","updated_at":"2025-03-26T22:30:42.964Z","avatar_url":"https://github.com/GcsSloop.png","language":"Java","readme":"# \u003cimg src=\"http://ww4.sinaimg.cn/large/005Xtdi2jw1f2jx68ugicj3074074jrm.jpg\" width=36 /\u003e 安卓3D翻转效果  \n\n## 作者微博：  [@GcsSloop](http://weibo.com/GcsSloop)\n\n### 基于谷歌官方提供的3D翻转示例进行修改，修复了在不同像素密度的设备上显示效果差异过大的问题。\n\n## 修正前后对比\n\n\u003cb\u003e修正前\u003c/b\u003e | \u003cb\u003e修正后\u003c/b\u003e\n--- | ---\n![image](https://github.com/GcsSloop/Rotate3dAnimation/blob/master/Pic/%E4%BF%AE%E6%AD%A3%E5%89%8D.gif) | ![image](https://github.com/GcsSloop/Rotate3dAnimation/blob/master/Pic/%E4%BF%AE%E6%AD%A3%E5%90%8E.gif)\n\n\n## 该文件已经包含在另一个仓库中，你可以[点击这里](https://github.com/GcsSloop/SUtil)查看。\n\n# 调用示例：\n``` java\n        // 计算中心点（这里是使用view的中心作为旋转的中心点）\n\t\tfinal float centerX = view.getWidth() / 2.0f;\n\t\tfinal float centerY = view.getHeight() / 2.0f;\n\n        //括号内参数分别为（上下文，开始角度，结束角度，x轴中心点，y轴中心点，深度，是否扭曲）\n\t\tfinal Rotate3dAnimation rotation = new Rotate3dAnimation(this, start, end, centerX, centerY, 1.0f, true);\n\t\trotation.setDuration(1500);                               //设置动画时长\n\t\trotation.setFillAfter(true);                              //保持旋转后效果\n\t\trotation.setInterpolator(new AccelerateInterpolator());   //设置插值器\n\n\t\trotation.setAnimationListener(new AnimationListener() {   //设置监听器\n\n\t\t\t@Override\n\t\t\tpublic void onAnimationStart(Animation animation) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onAnimationEnd(Animation animation) {\n\t\t\t}\n\t\t});\n\t\tview.startAnimation(rotation);                            //开始动画\n\n```\n\n\n\n## About Me\n\n\u003ca href=\"https://github.com/GcsSloop/SloopBlog/blob/master/FINDME.md\" target=\"_blank\"\u003e \u003cimg src=\"http://ww4.sinaimg.cn/large/005Xtdi2gw1f1qn89ihu3j315o0dwwjc.jpg\" width=300 height=100 /\u003e \u003c/a\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgcssloop%2Frotate3danimation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgcssloop%2Frotate3danimation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgcssloop%2Frotate3danimation/lists"}