{"id":19146667,"url":"https://github.com/tslamic/fancybackground","last_synced_at":"2025-04-16T14:26:24.932Z","repository":{"id":26720392,"uuid":"30177829","full_name":"tslamic/FancyBackground","owner":"tslamic","description":"FancyBackground is a tiny Android library designed to animate a set of resource Drawables.","archived":false,"fork":false,"pushed_at":"2015-02-24T11:37:21.000Z","size":6084,"stargazers_count":151,"open_issues_count":1,"forks_count":25,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-29T05:22:40.594Z","etag":null,"topics":["android","animation","background","fancy"],"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/tslamic.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}},"created_at":"2015-02-02T08:25:30.000Z","updated_at":"2024-04-01T09:21:24.000Z","dependencies_parsed_at":"2022-06-28T18:11:40.597Z","dependency_job_id":null,"html_url":"https://github.com/tslamic/FancyBackground","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/tslamic%2FFancyBackground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tslamic%2FFancyBackground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tslamic%2FFancyBackground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tslamic%2FFancyBackground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tslamic","download_url":"https://codeload.github.com/tslamic/FancyBackground/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249250356,"owners_count":21237884,"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","background","fancy"],"created_at":"2024-11-09T07:47:40.083Z","updated_at":"2025-04-16T14:26:24.905Z","avatar_url":"https://github.com/tslamic.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FancyBackground\n\nFancyBackground is a tiny Android library designed to animate a set of resource Drawables.  It ensures the drawables are subsampled and cached, if necessary, with heavy lifting done in the background.\n\nBefore  | After \n:-----------:|:-----------:\n![plain](http://i.imgur.com/7kH0FIN.png?1) | ![fancybg](http://i.imgur.com/Sh4XegD.gif)\n\nAchieving the above is easy:\n\n```\nFancyBackground.on(view)\n               .set(R.drawable.fst, R.drawable.snd, R.drawable.trd)\n               .inAnimation(R.anim.fade_in)\n               .outAnimation(R.anim.fade_out)\n               .interval(2500)\n               .start(); \n```\n\nDon't forget to add the following in your `build.gradle`:\n\n```\ndependencies {\n\tcompile 'com.github.tslamic.fancybackground:library:1.0'\n}\n```\n\n### Builder options\n\nMethod name | Description\n-----------:|:-----------\n`set` | sets the Drawable resources we wish to show/animate\n`inAnimation` | specifies the animation used to animate a `View` entering the screen.\n`outAnimation` | specifies the animation used to animate a `View` exiting the screen.\n`loop` | continuously loop through the Drawables or stop after the first cycle is complete.\n`interval` | the millisecond interval a Drawable instance will be displayed for.\n`scale` | determines how the Drawables should be resized or moved to match the size of the view we're animating on.\n`listener` | receives the `FancyBackground` events (described below)\n`cache` | caches loaded bitmaps so we don't have to do it again\n\n`FancyListener` can receive four events: \n\n- `onStarted` when the FancyBackground is started \n- `onNew` when a new image is set\n- `onLoopDone` if looping is set to false and the first cycle is complete\n- `onStopped` when the FancyBackground stops.\n\n`FancyCache` enables you to create your own bitmap cache. `FancyLruCache` is the default, targeting ~25% of the available heap and evicting the least recently used bitmap if over capacity. Use `null` to avoid caching.\n\n### An example?\n\nSee `app` for a hands-on example.\n\n### How to get it?\n\nGradle\n\n```\ndependencies {\n\tcompile 'com.github.tslamic.fancybackground:library:1.0'\n}\n```\n\nMaven\n\n```\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.tslamic.fancybackground\u003c/groupId\u003e\n    \u003cartifactId\u003elibrary\u003c/artifactId\u003e\n    \u003cversion\u003e1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nor download the aar by [clicking here](http://search.maven.org/remotecontent?filepath=com/github/tslamic/fancybackground/library/1.0/library-1.0.aar).\n\n### License\n\n\tThe MIT License (MIT)\n\t\n\tCopyright (c) 2015 Tadej Slamic\n\t\n\tPermission is hereby granted, free of charge, to any person obtaining a copy\n\tof this software and associated documentation files (the \"Software\"), to deal\n\tin the Software without restriction, including without limitation the rights\n\tto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\tcopies of the Software, and to permit persons to whom the Software is\n\tfurnished to do so, subject to the following conditions:\n\t\n\tThe above copyright notice and this permission notice shall be included in all\n\tcopies or substantial portions of the Software.\n\t\n\tTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\tIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\tFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\tAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\tLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\tOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n\tSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftslamic%2Ffancybackground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftslamic%2Ffancybackground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftslamic%2Ffancybackground/lists"}