{"id":18961929,"url":"https://github.com/tonnyl/spark","last_synced_at":"2025-04-05T13:05:47.440Z","repository":{"id":107360871,"uuid":"101482393","full_name":"TonnyL/Spark","owner":"TonnyL","description":"🎨 An Android library to create gradient animation like Instagram\u0026Spotify","archived":false,"fork":false,"pushed_at":"2019-05-18T16:30:09.000Z","size":4676,"stargazers_count":672,"open_issues_count":0,"forks_count":49,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-03-29T12:05:11.250Z","etag":null,"topics":["android","android-library","animation","gradient","gradient-animation","instagram","kotlin","spotify"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/TonnyL.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-08-26T11:46:39.000Z","updated_at":"2025-03-27T03:11:39.000Z","dependencies_parsed_at":"2023-06-11T07:03:22.488Z","dependency_job_id":null,"html_url":"https://github.com/TonnyL/Spark","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TonnyL%2FSpark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TonnyL%2FSpark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TonnyL%2FSpark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TonnyL%2FSpark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TonnyL","download_url":"https://codeload.github.com/TonnyL/Spark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247339155,"owners_count":20923014,"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","android-library","animation","gradient","gradient-animation","instagram","kotlin","spotify"],"created_at":"2024-11-08T14:14:43.294Z","updated_at":"2025-04-05T13:05:47.417Z","avatar_url":"https://github.com/TonnyL.png","language":"Kotlin","readme":"# Spark\n[![Build Status](https://travis-ci.org/TonnyL/Spark.svg?branch=master)](https://travis-ci.org/TonnyL/Spark)\n[![Download](https://api.bintray.com/packages/tonnyl/maven/spark/images/download.svg) ](https://bintray.com/tonnyl/maven/spark/_latestVersion)\n\nCreate gradient animations like Instagram\u0026Spotify.\n\n# Screenshots\n\u003cdiv align=\"center\"\u003e\n\t\u003cimg src=\"./art/spark.gif\" width=\"256\" alt=\"screenshot\"\u003e\n\u003c/div\u003e\n\n## Usage\n```kotlin\nprivate lateinit var _spark: Spark\n\noverride fun onCreate(savedInstanceState: Bundle?) {\n    super.onCreate(savedInstanceState)\n    setContentView(R.layout.activity_main)\n\n    _spark = Spark(frameLayout, Spark.ANIM_GREEN_PURPLE, 4000)\n    _spark.startAnimation()\n}\n\noverride fun onDestroy() {\n    super.onDestroy()\n\n    _spark.stopAnimation()\n}\n```\n\n## Installation\n### Gradle\n```gradle\ndependencies {\n    implementation 'io.github.tonnyl:spark:x.y.z'\n}\n```\n\n### Maven\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.github.tonnyl\u003c/groupId\u003e\n  \u003cartifactId\u003espark\u003c/artifactId\u003e\n  \u003cversion\u003ex.y.z\u003c/version\u003e\n  \u003ctype\u003epom\u003c/type\u003e\n\u003c/dependency\u003e\n```\n\n## Custom Gradient Colors\nSpark has 3 built-in animation-lists, and you can custom your owns.\n\n### Create gradient drawables\n`purple_drawable.xml`\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cshape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\"\u003e\n\n    \u003cgradient\n        android:centerColor=\"#e459aa\"\n        android:endColor=\"#cd7be6\"\n        android:startColor=\"#f14589\"\n        android:type=\"linear\" /\u003e\n\n    \u003ccorners android:radius=\"0dp\" /\u003e\n\n\u003c/shape\u003e\n```\n\n`yellow_drawable.xml`\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cshape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\"\u003e\n\n    \u003cgradient\n        android:centerColor=\"#F4A37B\"\n        android:endColor=\"#F08875\"\n        android:startColor=\"#F9CB87\"\n        android:type=\"linear\"/\u003e\n\n    \u003ccorners android:radius=\"0dp\" /\u003e\n\n\u003c/shape\u003e\n```\n\n### Create the Animation List\n`custom_anim_list.xml`\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003canimation-list xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:oneshot=\"false\"\u003e\n\n    \u003citem\n        android:drawable=\"@drawable/yellow_drawable\"\n        android:duration=\"4500\" /\u003e\n\n    \u003citem\n        android:drawable=\"@drawable/purple_drawable\"\n        android:duration=\"4500\" /\u003e\n\n\u003c/animation-list\u003e\n```\n\n### Apply Your Custom Animation List\n```kotlin\n_spark = Spark(\n    frameLayout,\n    R.drawable.your_custom_anim_list, // Your custom animation\n    4000\n)\n```\n\n## Thanks\n\nDesigned by [Alexander Zaytsev](https://dribbble.com/anwaltzzz).\n\n![Sketch Gradients](./art/Sketch_Gradients.png)\n\n## License\nSpark is under the MIT license. See the [LICENSE](LICENSE) for more information.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonnyl%2Fspark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftonnyl%2Fspark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonnyl%2Fspark/lists"}