{"id":13848536,"url":"https://github.com/carlonzo/StikkyHeader","last_synced_at":"2025-07-12T13:31:32.317Z","repository":{"id":81476387,"uuid":"23773782","full_name":"carlonzo/StikkyHeader","owner":"carlonzo","description":"This is a very simple library for Android that allows you to stick an header to a scrollable view and easily apply animation to it","archived":false,"fork":false,"pushed_at":"2023-12-15T17:27:08.000Z","size":6718,"stargazers_count":840,"open_issues_count":15,"forks_count":182,"subscribers_count":36,"default_branch":"develop","last_synced_at":"2024-08-05T19:35:47.090Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","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/carlonzo.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":"2014-09-07T23:29:09.000Z","updated_at":"2024-07-26T19:42:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"a7472432-baf1-47a5-b205-d42c8e62f123","html_url":"https://github.com/carlonzo/StikkyHeader","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/carlonzo%2FStikkyHeader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlonzo%2FStikkyHeader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlonzo%2FStikkyHeader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlonzo%2FStikkyHeader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carlonzo","download_url":"https://codeload.github.com/carlonzo/StikkyHeader/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225825266,"owners_count":17529905,"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-08-04T19:00:51.491Z","updated_at":"2024-11-22T00:30:37.595Z","avatar_url":"https://github.com/carlonzo.png","language":"Java","funding_links":[],"categories":["Java","Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"readme":"StikkyHeader\n============\n\nThis is a very simple library for Android that allows you to stick an header to a ListView and easily apply animation to it\n\n## Usage\n\nTo use the StikkyHeader library, you just need 3 lines:\n\n```java\n  StikkyHeaderBuilder.stickTo(mListView)\n    .setHeader(R.id.header, containerLayout)\n    .minHeightHeader(250)\n    .build();\n```\nthat's all, folks! \n\n## Header Animator\n\nUsing the StikkyHeader you can create easly some nice animations extending the ``HeaderStikkyAnimator`` and using the utility ``AnimatorBuilder``.\nThe animations available are ``Translation``, ``Scale`` and ``Fade`` and can be combined to build an animation during the translation of the StikkyHeader.\n\nExample:\n```java\npublic class IconAnimator extends HeaderStikkyAnimator {\n\n    @Override\n    public AnimatorBuilder getAnimatorBuilder() {\n\n        View viewToAnimate = getHeader().findViewById(R.id.icon);\n        Point point = new Point(50,100) // translate to the point with coordinate (50,100);\n        float scaleX = 0.5f //scale to the 50%\n        float scaleY = 0.5f //scale to the 50%\n        float fade = 0.2f // 20% fade\n\n        AnimatorBuilder animatorBuilder = AnimatorBuilder.create()\n            .applyScale(viewToAnimate, scaleX, scaleY)\n            .applyTranslation(viewToAnimate, point)\n            .applyFade(viewToAnimate, fade);\n\n        return animatorBuilder;\n    }\n}\n```\n\nand then set the animator to the StikkyHeader:\n\n```java\n  StikkyHeaderBuilder.stickTo(mListView)\n    .setHeader(R.id.header, containerLayout)\n    .minHeightHeader(250)\n    .animator(new IconAnimator())\n    .build();\n```\n\n## ViewGroups supported\n\nThe StikkyHeader supports:\n- ListView\n- RecyclerView\n- ScrollView\n\n## How to integrate\n\nGrab via Gradle:\n```groovy\nrepositories {\n  maven { url \"https://oss.sonatype.org/content/repositories/snapshots/\" }\n}\ndependencies {\n  compile 'com.github.carlonzo.stikkyheader:core:0.0.3-SNAPSHOT'\n}\n```\n\nor via Maven:\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.carlonzo.stikkyheader\u003c/groupId\u003e\n  \u003cartifactId\u003ecore\u003c/artifactId\u003e\n  \u003cversion\u003e0.0.3-SNAPSHOT\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Video\n\n![Example 1](https://raw.githubusercontent.com/carlonzo/StikkyHeader/develop/readme/example1.gif)\n![Example 2](https://raw.githubusercontent.com/carlonzo/StikkyHeader/develop/readme/example2.gif)\n\n## Demo\n\nhere the [link][1] to the emulator to try few examples.\n[1]: https://appetize.io/embed/urptay0fdprc9dp3xzk6e41g70?screenOnly=false\u0026scale=75\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarlonzo%2FStikkyHeader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarlonzo%2FStikkyHeader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarlonzo%2FStikkyHeader/lists"}