{"id":17115886,"url":"https://github.com/blundell/quicksand","last_synced_at":"2025-04-06T09:08:35.201Z","repository":{"id":31388607,"uuid":"34951729","full_name":"blundell/QuickSand","owner":"blundell","description":"Automatically manipulates the duration of animations dependent on view count. Quicksand .. the more you struggle.","archived":false,"fork":false,"pushed_at":"2023-10-18T12:30:08.000Z","size":8873,"stargazers_count":385,"open_issues_count":2,"forks_count":39,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-30T08:08:25.793Z","etag":null,"topics":["android","animation-duration","enchanting","user-experience"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blundell.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2015-05-02T14:58:17.000Z","updated_at":"2025-03-15T09:31:25.000Z","dependencies_parsed_at":"2024-08-09T13:21:03.162Z","dependency_job_id":null,"html_url":"https://github.com/blundell/QuickSand","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blundell%2FQuickSand","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blundell%2FQuickSand/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blundell%2FQuickSand/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blundell%2FQuickSand/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blundell","download_url":"https://codeload.github.com/blundell/QuickSand/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247457802,"owners_count":20941906,"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-duration","enchanting","user-experience"],"created_at":"2024-10-14T17:47:14.011Z","updated_at":"2025-04-06T09:08:35.181Z","avatar_url":"https://github.com/blundell.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"QuickSand\n=========\n\nWhen showing a really enchanting explanatory animation to your users, but you know that after a while it'll get tedious and would stop users wanting to use your app. QuickSand is here to solve that problem.\n\nAutomatically manipulates the duration of animations depending on how many times the user has viewed them.\n\nSimple Use\n----------\n\nThis is the setup needed to define how you change the animation duration between views:\n\n```java\nMap\u003cString, ViscosityInterpolator\u003e modifiers = new HashMap\u003c\u003e();\nmodifiers.put(\"MyAnimationSetKey\", TwoStepViscosityInterpolator.defaultInstance());\nQuicksand.create(this, modifiers);\n```\n\nThis is \"trapping\" an animation, meaning when this view is animated `Quicksand` will determine how many times it has been viewed and vary the animation duration according to the `ViscosityInterpolator` set above:\n\n```java \nView myView = findViewById(R.id.my_view);\nQuickSand.trap(\"MyAnimationSetKey\", myView);\nmyView.animate().alpha();\n```\n\nAlso works for multiple view animation:\n\n```java\n View myView = findViewById(R.id.my_view);\n View myOtherView = findViewById(R.id.my_view);\n View myThirdView = findViewById(R.id.my_view);\n QuickSand.trap(\"MyAnimationSetKey\", myView, myOtherView, myThirdView);\n myView.animate().alpha();\n myOtherView.animate().alpha();\n myThirdView.animate().alpha();\n```\n\nSome viscosities already defined [see the code here](https://github.com/blundell/QuickSand/tree/master/core/src/main/java/com/blundell/quicksand/viscosity):\n\n- [AllOrNothing](https://github.com/blundell/QuickSand/blob/master/core/src/main/java/com/blundell/quicksand/viscosity/AllOrNothingViscosityInterpolator.java) - you can run your animation for X seconds X times and then 0 seconds after that\n- [LinearChange](https://github.com/blundell/QuickSand/blob/master/core/src/main/java/com/blundell/quicksand/viscosity/LinearChangeViscosityInterpolator.java) - speed up the animation each time it is viewed until X views\n- [TwoStep](https://github.com/blundell/QuickSand/blob/master/core/src/main/java/com/blundell/quicksand/viscosity/TwoStepViscosityInterpolator.java) - run animation at X speed for X times then it will run at half X\n\nSee the [demo project](https://github.com/blundell/QuickSand/tree/master/demo) for more examples.\n\nAdding to your project\n--------\n\n```groovy\ndependencies {\n    compile 'com.blundell:quicksand:1.0.2'\n}\n```\n\n\n--------\n\nSee it to believe it\n--------\n\n|15 second gif below|  \n|---|\nNotice how the animation duration decreases each time it is ran until eventually it does not animate (only touch feedback), `Quicksand` integration is done with 2 lines of code.|\n|![demo](demo/demo_z1c.gif)|\n\nDownload\n--------\n\n[Release Notes](https://github.com/blundell/QuickSand/blob/master/releases/RELEASE-NOTES.MD)\nGet [the latest version here](https://github.com/blundell/QuickSand/raw/master/releases/)\n\nLicense\n-------\n\n[Apache 2](LICENSE.txt)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblundell%2Fquicksand","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblundell%2Fquicksand","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblundell%2Fquicksand/lists"}