{"id":13396111,"url":"https://github.com/flavienlaurent/discrollview","last_synced_at":"2025-05-16T08:05:30.819Z","repository":{"id":13190134,"uuid":"15873714","full_name":"flavienlaurent/discrollview","owner":"flavienlaurent","description":"Scroll + discover = DiscrollView","archived":false,"fork":false,"pushed_at":"2022-02-06T15:46:15.000Z","size":7692,"stargazers_count":1451,"open_issues_count":12,"forks_count":335,"subscribers_count":79,"default_branch":"master","last_synced_at":"2024-10-14T18:07:57.103Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/flavienlaurent.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":"2014-01-13T16:17:59.000Z","updated_at":"2024-10-04T16:17:03.000Z","dependencies_parsed_at":"2022-09-17T05:41:07.156Z","dependency_job_id":null,"html_url":"https://github.com/flavienlaurent/discrollview","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/flavienlaurent%2Fdiscrollview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flavienlaurent%2Fdiscrollview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flavienlaurent%2Fdiscrollview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flavienlaurent%2Fdiscrollview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flavienlaurent","download_url":"https://codeload.github.com/flavienlaurent/discrollview/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254493378,"owners_count":22080126,"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":[],"created_at":"2024-07-30T18:00:40.466Z","updated_at":"2025-05-16T08:05:25.811Z","avatar_url":"https://github.com/flavienlaurent.png","language":"Java","funding_links":[],"categories":["Index `(light-weight pages)`","Java","Index","Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"readme":"Discrollview  \n==================\n\nRegularly, I am pleasantly surprised by websites using a pattern I called the discrollver pattern. I'm sure you already know what I'm talking about but if not, http://vimeo.com/player is a good example. When you scroll, widgets appear from nowhere by fade, translation or scale.\n\nWith DiscrollView, I wanted to import this pattern on Android. This is an 0.0.1 alpha version because you have to do all the transformation work (fade, translation, scale etc) yourself base on a ratio value. I'm going to add some transformation presets (translation from left to right + fade in for example) to make the library more ready to use for lazy developers.\n\n![Animated gif][4] ([on youtube][1])\n\nTry out the sample APK [here][2]\n\nOr browse the [source code of the sample application][3] for a complete example of use.\n\nIncluding in your project\n-------------------------\n\nJust add the library to your application as a library project.\n\nCompatibilty\n------------\n\nAPI 14+\n\nUsage\n---------\n\nUsing the library is simple, just look at the source code of the provided sample [here][3]\n\n### build.gradle\n\n```\ncompile 'com.github.flavienlaurent.discrollview:library:0.0.2@aar'\n```\n\n### The main layout\n\nYou must use the DiscrollViewContent view.\n\n```xml\n\u003ccom.flavienlaurent.discrollview.lib.DiscrollView\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:discrollve=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\u003e\n\n    \u003ccom.flavienlaurent.discrollview.lib.DiscrollViewContent\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\u003e\n\n        \u003c!-- here you put discrollvable views --\u003e\n\n    \u003c/com.flavienlaurent.discrollview.lib.DiscrollViewContent\u003e\n\n\u003c/com.flavienlaurent.discrollview.lib.DiscrollView\u003e\n```\n\n### Discrollvable views\n\nYou can apply some transformation on discroll:\n\n- alpha\n- scale\n- translation (fromLeft, fromBottom, fromRight, fromTop)\nfromLeft+fromRight and fromBottom+fromTop are forbidden couples.\n- bgcolor\n\n```xml\ndiscrollve:discrollve_alpha=\"true\"\ndiscrollve:discrollve_translation=\"fromLeft|fromBottom\"\ndiscrollve:discrollve_scaleX=\"true\"\ndiscrollve:discrollve_scaleY=\"true\"\ndiscrollve:discrollve_fromBgColor=\"#88EE66\"\ndiscrollve:discrollve_toBgColor=\"#000000\"\ndiscrollve:discrollve_threshold=\"0.3\"\n```\n\nThe threshold attribute is used to trigger the discrollve at a specified ratio. For example, if threshold=0.3, the discrollve starts when the ratio \u003e= 0.3.\n\n### A simple example\n\n```xml\n\u003ccom.flavienlaurent.discrollview.lib.DiscrollView\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:discrollve=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\u003e\n\n    \u003ccom.flavienlaurent.discrollview.lib.DiscrollViewContent\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\u003e\n\n        \u003cTextView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"600dp\"\n            android:background=\"@android:color/white\"\n            android:textColor=\"@android:color/black\"\n            android:padding=\"25dp\"\n            android:textSize=\"72sp\"\n            android:gravity=\"center\"\n            android:fontFamily=\"serif\"\n            android:text=\"Do you love cheese?\" /\u003e\n\n        \u003cView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"200dp\"\n            android:background=\"#007788\"\n            discrollve:discrollve_alpha=\"true\"\n            discrollve:discrollve_threshold=\"0.3\" /\u003e\n\n        \u003cImageView\n            android:layout_width=\"200dp\"\n            android:layout_height=\"120dp\"\n            discrollve:discrollve_alpha=\"true\"\n            discrollve:discrollve_translation=\"fromLeft|fromBottom\"\n            android:src=\"@drawable/cheese1\" /\u003e\n\n        \u003cView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"200dp\"\n            discrollve:discrollve_fromColor=\"#88EE66\"\n            discrollve:discrollve_toColor=\"#000000\" /\u003e\n\n        \u003cImageView\n            android:layout_width=\"220dp\"\n            android:layout_height=\"110dp\"\n            android:layout_gravity=\"right\"\n            android:src=\"@drawable/cheese2\"\n            discrollve:discrollve_translation=\"fromRight\" /\u003e\n\n        \u003cTextView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:padding=\"20dp\"\n            android:fontFamily=\"serif\"\n            android:gravity=\"center\"\n            android:text=\"When the cheese comes out everybody's happy pecorino red leicester\"\n            android:textSize=\"18sp\"\n            discrollve:discrollve_alpha=\"true\"\n            discrollve:discrollve_translation=\"fromBottom\" /\u003e\n\n        \u003cImageView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_margin=\"20dp\"\n            android:layout_gravity=\"center\"\n            android:src=\"@drawable/ilovecheese_heart\"\n            discrollve:discrollve_scaleX=\"true\"\n            discrollve:discrollve_scaleY=\"true\"  /\u003e\n\n    \u003c/com.flavienlaurent.discrollview.lib.DiscrollViewContent\u003e\n\u003c/com.flavienlaurent.discrollview.lib.DiscrollView\u003e\n```\n\nLicense\n-----------\n\n    Copyright 2013 Flavien Laurent\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n [1]: http://youtu.be/FGYaweSP3sA\n [2]: https://github.com/flavienlaurent/discrollview/raw/master/sample.apk\n [3]: https://github.com/flavienlaurent/discrollview/tree/master/sample\n [4]: https://raw2.github.com/flavienlaurent/discrollview/master/discrollview.gif\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflavienlaurent%2Fdiscrollview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflavienlaurent%2Fdiscrollview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflavienlaurent%2Fdiscrollview/lists"}