{"id":27767961,"url":"https://github.com/bernaferrari/carouselgifviewer","last_synced_at":"2025-07-16T01:03:44.019Z","repository":{"id":107061075,"uuid":"141369132","full_name":"bernaferrari/CarouselGifViewer","owner":"bernaferrari","description":"Efficiently display a list of GIFs in a carousel (RecyclerView).","archived":false,"fork":false,"pushed_at":"2019-08-25T21:19:47.000Z","size":1810,"stargazers_count":36,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-29T19:56:41.993Z","etag":null,"topics":["android","android-app","android-application","carousel","exomedia","exoplayer","gif","glide","groupie","kotlin","kotlin-android","recyclerview","rxjava2","sample-app"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/bernaferrari.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-07-18T02:17:00.000Z","updated_at":"2024-07-09T06:31:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"ad56f3da-9b37-4ea0-9216-2179fc9e9a5a","html_url":"https://github.com/bernaferrari/CarouselGifViewer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bernaferrari/CarouselGifViewer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernaferrari%2FCarouselGifViewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernaferrari%2FCarouselGifViewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernaferrari%2FCarouselGifViewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernaferrari%2FCarouselGifViewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bernaferrari","download_url":"https://codeload.github.com/bernaferrari/CarouselGifViewer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernaferrari%2FCarouselGifViewer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265472399,"owners_count":23771868,"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-app","android-application","carousel","exomedia","exoplayer","gif","glide","groupie","kotlin","kotlin-android","recyclerview","rxjava2","sample-app"],"created_at":"2025-04-29T19:56:38.569Z","updated_at":"2025-07-16T01:03:44.003Z","avatar_url":"https://github.com/bernaferrari.png","language":"Kotlin","readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"assets/github_icon.png\" alt=\"Carousel Gif Viewer\" height=\"200px\"\u003e\u003c/p\u003e\n\nCarousel Gif Viewer\n===================\n\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/0b20b4208805461eac30075f81ae0ca9)](https://www.codacy.com/app/bernaferrari/CarouselGifViewer?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=bernaferrari/CarouselGifViewer\u0026amp;utm_campaign=Badge_Grade)\n\nThis app **efficiently** displays a list of GIFs in a carousel.\n\n### Motivation:\nDisplaying a list of GIFs is not something easy, it is:\n - Heavy;\n - Has a high chance of OOM error on low-end devices;\n - Quality is really low;\n - There is a high data usage, a video file can easily get 10x bigger.\n\nOn the other hand, displaying them as looping video (mp4) is not something trivial. ExoPlayer usually only allows to play [2 to 4 videos simultaneously](https://github.com/google/ExoPlayer/issues/273).\nBesides this, RecyclerView really wasn't made to work well with players, with some [recent tries](https://github.com/eneim/toro) successfully making around some of the limitations.\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"assets/showcase.gif?raw=true\" alt=\"Carousel Gif Viewer\"\u003e\u003c/p\u003e\n\n### How it works:\n\nAfter a lot of frustration, I came to the idea of this app (which is just an activity inside [my other app](https://play.google.com/store/apps/details?id=com.biblialibras.android])). There is a [DiscreteScrollView](https://github.com/yarolegovich/DiscreteScrollView) (which is a RecyclerView with a custom layoutManager) displaying the GIF preview (a jpg thumbnail), and a fixed [ExoMedia player](https://github.com/brianwernick/ExoMedia) at the center of the screen playing a looping mp4 file.\nThe trick is: the player doesn't go anywhere. When user scrolls, the player is hidden. As soon as the RecyclerView stops scrolling, the player is shown. Since it has the same size and corners as the images, everything works seamlessly.\nIt also helps that Gfycat, which is used in this sample, generates the image thumbnail based on the first frame, so the video always starts playing from the same place as the picture is.\n\nCurrent use case for this app is as a Brazilian Sign Language Dictionary on \"*Bíblia em Libras*\" (Bible in Brazilian Sign Language) app, under \"*Dicionário*\".\n[Download it here.](https://play.google.com/store/apps/details?id=com.biblialibras.android])\n\n## Screenshots\n\n| Main Screen | Drawer |\n|:-:|:-:|\n| ![First](assets/main_screen.png?raw=true) | ![Sec](assets/drawer.png?raw=true) |\n\n### Side note\nI tested the most popular GIF hosting sites, and Gfycat has been the best by far!\n- Tenor won't allow editing, removing, renaming or changing tags after a GIF is uploaded (unless you contact support).\n- Giphy is a mess, uploaded gifs won't show on search unless you are verified (and it is not easy to become verified); main channel page is a mess.\n- Gfycat allows to create albums and sort GIFs; support is great and fast; API just works; view count is great; GIFs with random names instead of random ids is also great.\n\n### Reporting Issues\n\nIssues and Pull Requests are welcome.\nYou can report [here](https://github.com/bernaferrari/CarouselGifViewer/issues).\n\nLicense\n-------\n\nCopyright 2018 Bernardo Ferrari.\n\nLicensed to the Apache Software Foundation (ASF) under one or more contributor\nlicense agreements.  See the NOTICE file distributed with this work for\nadditional information regarding copyright ownership.  The ASF licenses this\nfile to you under the Apache License, Version 2.0 (the \"License\"); you may not\nuse this file except in compliance with the License.  You may obtain a copy of\nthe License at\n\nhttp://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, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbernaferrari%2Fcarouselgifviewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbernaferrari%2Fcarouselgifviewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbernaferrari%2Fcarouselgifviewer/lists"}