{"id":20009149,"url":"https://github.com/samlss/xanimator","last_synced_at":"2025-05-04T19:35:46.946Z","repository":{"id":201738215,"uuid":"143366708","full_name":"samlss/XAnimator","owner":"samlss","description":"🐣An animation framework(一个动画框架).","archived":false,"fork":false,"pushed_at":"2018-08-07T09:56:57.000Z","size":4275,"stargazers_count":54,"open_issues_count":0,"forks_count":6,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-08T11:37:56.289Z","etag":null,"topics":["android","animation"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samlss.png","metadata":{"files":{"readme":"README-ZH.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,"governance":null}},"created_at":"2018-08-03T02:21:02.000Z","updated_at":"2023-02-13T06:10:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"9ee7eb37-71ed-4d2d-b2c5-9b79d2f63e9e","html_url":"https://github.com/samlss/XAnimator","commit_stats":null,"previous_names":["samlss/xanimator"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlss%2FXAnimator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlss%2FXAnimator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlss%2FXAnimator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlss%2FXAnimator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samlss","download_url":"https://codeload.github.com/samlss/XAnimator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252390605,"owners_count":21740352,"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"],"created_at":"2024-11-13T07:14:27.779Z","updated_at":"2025-05-04T19:35:46.200Z","avatar_url":"https://github.com/samlss.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XAnimator\n### 一个动画框架，根据ScrollView或者HorizontalScrollView中的滑动距离设置对应子view的动画效果.\n\n[![Api reqeust](https://img.shields.io/badge/api-11+-green.svg)](https://github.com/samlss/XAnimator)  [![Apache License 2.0](https://img.shields.io/hexpm/l/plug.svg)](https://github.com/samlss/XAnimator/blob/master/LICENSE) [![Blog](https://img.shields.io/badge/samlss-blog-orange.svg)](https://blog.csdn.net/Samlss)\n\n\n![gif1](https://github.com/samlss/XAnimator/blob/master/screenshots/screenshot1.gif)\n\n\u003cbr/\u003e\n\n![gif2](https://github.com/samlss/XAnimator/blob/master/screenshots/screenshot2.gif)\n\n\n\n## 使用\u003cbr\u003e\n在根目录的build.gradle添加这一句代码：\n```\nallprojects {\n    repositories {\n        //...\n        maven { url 'https://jitpack.io' }\n    }\n}\n```\n\n在app目录下的build.gradle添加依赖使用：\n```\ndependencies {\n    implementation 'com.github.samlss:XAnimator:1.0'\n}\n```\n\n## 属性说明：\n\n| 属性        | 说明           |\n| ------------- |:-------------:|\n| x_alpha      | 是否执行透明值变化动画(范围为0-1) |\n| x_scaleX | 是否执行x轴缩放动画(范围为0-1) |\n| x_scaleY | 是否执行y轴缩放动画(范围为0-1) |\n| x_startBgColor | 背景颜色渐变动画起始颜色值 |\n| x_endBgColor | 背景颜色渐变动画结束颜色值 |\n| from_direction | 出现方向，top, bottom, left, right，分别为从顶部，底部，左边，右边出现|\n\n\u003cbr/\u003e\n\n## 注意\n你可以像正常使用ScrollView和HorizontalScrollView一样，只不过这里要使用自定义的`XAnimatorScrollView/XAnimatorHorizontalScrollView`\n以及`XAnimatorLinearLayout`(orientation属性也要指定哦)\n\n## 布局中使用：\n```\n\u003ccom.iigo.library.XAnimatorScrollView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\u003e\n\n        \u003ccom.iigo.library.XAnimatorLinearLayout\n            android:orientation=\"vertical\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\u003e\n\n            \u003cImageView\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:src=\"@mipmap/duola_big\" /\u003e\n\n            \u003cImageView\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"200dp\"\n                android:src=\"@mipmap/duola1\"\n                app:x_alpha=\"true\"\n                app:x_scaleX=\"true\"\n                app:x_scaleY=\"true\"\n                app:from_direction=\"left\"/\u003e\n\n            \u003cImageView\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"200dp\"\n                android:src=\"@mipmap/duola2\"\n                app:from_direction=\"right\"\n                app:x_alpha=\"true\"\n                app:x_scaleX=\"true\"\n                app:x_scaleY=\"true\" /\u003e\n\n            \u003cImageView\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"200dp\"\n                android:src=\"@mipmap/duola3\"\n                app:from_direction=\"left\"\n                app:x_alpha=\"true\" /\u003e\n\n            \u003cImageView\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"200dp\"\n                android:src=\"@mipmap/duola4\"\n                app:from_direction=\"right\"\n                app:x_alpha=\"true\" /\u003e\n\n\n            \u003cImageView\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"200dp\"\n                android:src=\"@mipmap/duola5\"\n                app:x_endBgColor=\"@android:color/holo_red_light\"\n                app:x_startBgColor=\"@android:color/holo_green_light\" /\u003e\n\n            \u003cLinearLayout\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                app:x_endBgColor=\"@android:color/holo_orange_light\"\n                app:x_startBgColor=\"@android:color/holo_green_light\"\u003e\n\n                \u003cImageView\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"200dp\"\n                    android:src=\"@mipmap/duola6\" /\u003e\n            \u003c/LinearLayout\u003e\n\n        \u003c/com.iigo.library.XAnimatorLinearLayout\u003e\n    \u003c/com.iigo.library.XAnimatorScrollView\u003e\n```\n\n## 代码中使用，以在Activity中使用为例：\n```\n  setContentView(XAnimator.initLayout(this, R.layout.activity_scrollview));\n```\n\n\n## License\n```\nCopyright 2018 samlss\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamlss%2Fxanimator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamlss%2Fxanimator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamlss%2Fxanimator/lists"}