{"id":17688207,"url":"https://github.com/ccapton/android-slview","last_synced_at":"2025-10-09T04:43:44.649Z","repository":{"id":176302369,"uuid":"99804805","full_name":"Ccapton/Android-SLView","owner":"Ccapton","description":"几个简单的动画，后续会有补充修改","archived":false,"fork":false,"pushed_at":"2017-08-09T12:45:19.000Z","size":1319,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-09T04:43:40.549Z","etag":null,"topics":[],"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/Ccapton.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-09T12:17:45.000Z","updated_at":"2017-08-10T03:04:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"4fe41ce2-2110-4d00-8c8b-401cfeecafac","html_url":"https://github.com/Ccapton/Android-SLView","commit_stats":null,"previous_names":["ccapton/android-slview"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Ccapton/Android-SLView","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ccapton%2FAndroid-SLView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ccapton%2FAndroid-SLView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ccapton%2FAndroid-SLView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ccapton%2FAndroid-SLView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ccapton","download_url":"https://codeload.github.com/Ccapton/Android-SLView/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ccapton%2FAndroid-SLView/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000709,"owners_count":26082921,"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-09T02:00:07.460Z","response_time":59,"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":[],"created_at":"2024-10-24T11:43:46.330Z","updated_at":"2025-10-09T04:43:44.633Z","avatar_url":"https://github.com/Ccapton.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Android-SLView\n几个简单的动画，后续会有补充修改\n\nSLViewDemo.apk : https://raw.githubusercontent.com/Ccapton/Android-SLView/master/SLViewDemo.apk\n\n![](https://raw.githubusercontent.com/Ccapton/Android-SLView/master/SLView.gif)\n\n### 如何配置\nbuild.gradle(Project)\n``` code\nallprojects {\n\t\trepositories {\n\t\t\t...\n\t\t\tmaven { url 'https://jitpack.io' }\n\t\t}\n\t}\n```\nbuild.gradle(Module:app)\n``` code \n dependencies {\n\t        compile 'com.github.Ccapton:Android-SLView:1.0'\n\t}\n```\n\n### 公共方法\n``` code\n   setStyle(String style) //选择动画样式: SLView.STYLE_ROTATING_CIRCLE  SLView.STYLE_MOVING_RECTANGLE  SLView.STYLE_3D_ROTATING_RECTANGLE\n   setInterpolator(Interpolator interpolator) //设置插值器  例如 LinearInterpolator、 AccelerateInterpolator、FastOutLinearInInterpolator等等\n   setBackgroundColorRes(int colorRes) //设置动画主体颜色\n   setBallColorRes(int colorRes)   //当动画样式为：STYLE_ROTATING_CIRCLE时，设置小球的颜色\n```\n\n### 使用方法\nxml中\n```\n  \u003ccom.capton.sl.SLView\n              android:id=\"@+id/slview\"\n              xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n              android:layout_width=\"50dp\"\n              android:layout_height=\"50dp\"\n              android:layout_marginBottom=\"@dimen/activity_horizontal_margin\"\u003e\n\n          \u003c/com.capton.sl.SLView\u003e\n\n          \u003ccom.capton.sl.SLView\n              android:id=\"@+id/slview2\"\n              xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n              android:layout_width=\"50dp\"\n              android:layout_height=\"50dp\"\n              android:layout_marginBottom=\"@dimen/activity_horizontal_margin\"\n              app:style=\"@string/style_movingRectangle\"\u003e\n\n          \u003c/com.capton.sl.SLView\u003e\n\n          \u003ccom.capton.sl.SLView\n              android:id=\"@+id/slview3\"\n              xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n              android:layout_width=\"50dp\"\n              android:layout_height=\"50dp\"\n              android:layout_marginBottom=\"@dimen/activity_horizontal_margin\"\n              app:style=\"@string/style_3DRotatingRectangle\"\u003e\n```\n\nActivity中\n```\nprivate SLView slView;\n    private SLView slView2;\n    private SLView slView3;\n    private SLView slView4;\n    private SLView slView5;\n    private SLView slView6;\n    private LinearLayout linerlayout;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_main);\n\n        linerlayout= (LinearLayout) findViewById(R.id.container2);\n        slView= (SLView) findViewById(R.id.slview);\n        slView2= (SLView) findViewById(R.id.slview2);\n        slView3= (SLView) findViewById(R.id.slview3);\n\n        LinearLayout.LayoutParams lp=new LinearLayout.LayoutParams(DisplayUtil.dip2px(this,50), DisplayUtil.dip2px(this,50));\n        lp.setMargins(0,0,0, DisplayUtil.dip2px(this,16));\n        lp.gravity=Gravity.CENTER_HORIZONTAL;\n\n        TextView tv=new TextView(this);\n        tv.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));\n        tv.setGravity(Gravity.CENTER);\n        tv.setTextSize(16);\n        tv.setText(\"Java代码生成\");\n        tv.setTextColor(getResources().getColor(R.color.colorAccent));\n\n        slView4=new SLView(this);\n        slView4.setLayoutParams(lp);\n        slView4.setStyle(SLView.STYLE_ROTATING_CIRCLE);\n        slView4.setInterpolator(new AccelerateInterpolator());\n        slView4.setBackgroundColorRes(R.color.colorAccent);\n\n        slView5=new SLView(this);\n        slView5.setLayoutParams(lp);\n        slView5.setStyle(SLView.STYLE_MOVING_RECTANGLE);\n        slView5.setInterpolator(new LinearInterpolator());\n        slView5.setBackgroundColorRes(R.color.colorAccent);\n\n        slView6=new SLView(this);\n        slView6.setLayoutParams(lp);\n        slView6.setStyle(SLView.STYLE_3D_ROTATING_RECTANGLE);\n        slView6.setBackgroundColorRes(R.color.colorAccent);\n\n        linerlayout.addView(tv);\n        linerlayout.addView(slView4);\n        linerlayout.addView(slView5);\n        linerlayout.addView(slView6);\n    }\n```\n               \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccapton%2Fandroid-slview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fccapton%2Fandroid-slview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccapton%2Fandroid-slview/lists"}