{"id":13396432,"url":"https://github.com/klinker41/android-slidingactivity","last_synced_at":"2026-01-20T13:38:18.608Z","repository":{"id":57725922,"uuid":"41426740","full_name":"klinker41/android-slidingactivity","owner":"klinker41","description":"Android library which allows you to swipe down from an activity to close it.","archived":false,"fork":false,"pushed_at":"2017-12-09T15:03:29.000Z","size":6913,"stargazers_count":1276,"open_issues_count":16,"forks_count":182,"subscribers_count":33,"default_branch":"master","last_synced_at":"2024-07-31T18:17:27.806Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/klinker41.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-26T13:20:14.000Z","updated_at":"2024-06-27T13:01:33.000Z","dependencies_parsed_at":"2022-09-02T03:41:29.724Z","dependency_job_id":null,"html_url":"https://github.com/klinker41/android-slidingactivity","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/klinker41/android-slidingactivity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klinker41%2Fandroid-slidingactivity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klinker41%2Fandroid-slidingactivity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klinker41%2Fandroid-slidingactivity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klinker41%2Fandroid-slidingactivity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/klinker41","download_url":"https://codeload.github.com/klinker41/android-slidingactivity/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klinker41%2Fandroid-slidingactivity/sbom","scorecard":{"id":563478,"data":{"date":"2025-08-11","repo":{"name":"github.com/klinker41/android-slidingactivity","commit":"247a2eeb74f902d7246942b32a320b66ad571f30"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":2,"reason":"Found 6/27 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T14:18:51.305Z","repository_id":57725922,"created_at":"2025-08-20T14:18:51.306Z","updated_at":"2025-08-20T14:18:51.306Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28603890,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T12:01:53.233Z","status":"ssl_error","status_checked_at":"2026-01-20T12:01:46.545Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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:51.315Z","updated_at":"2026-01-20T13:38:18.590Z","avatar_url":"https://github.com/klinker41.png","language":"Java","readme":"# Android Sliding Activity Library\n\n![Preview](preview.gif)\n![Preview Landscape](preview_landscape.gif)\n![Preview Inbox Animation](preview_inbox_animation.gif)\n\nEasily create activities that can slide vertically on the screen and fit well into the Material Design age.\n\n## Features\n\nSliding activities allow for you to easily set header content, menus, and data onto a slidable screen. The library currently supports a variety of custom features that allow you to make the screen unique. Currently support are the following:\n\n - Set the title and have this title shrink into the toolbar as you scroll\n - Set a header image that disappears into the toolbar as you scroll\n - Set colors that will affect the header and status bar color\n - Add a floating action button to the bottom of the header that will animate and show/hide itself at the correct time\n - Disable the header and show only content that is scrollable\n - Works with [PeekView](https://github.com/klinker24/Android-3DTouch-PeekView) out of the box, to provide a \"3D Touch\" effect on your views. See example usage in the [TalonActivity](https://github.com/klinker41/android-slidingactivity/blob/master/sample/src/main/java/com/klinker/android/sliding/sample/TalonActivity.java) sample.\n\n ![Preview Talon/PeekView](preview_peekview.gif)\n\n## Installation\n\nInclude the following in your gradle script:\n\n```groovy\ndependencies {\n    compile 'com.klinkerapps:sliding-activity:1.5.2'\n}\n```\n\nand resync the project.\n\n## Example Usage\n\nSliding activities are very easy to implement. Here is a simple example:\n\n```java\npublic class NormalActivity extends SlidingActivity {\n\n    @Override\n    public void init(Bundle savedInstanceState) {\n        setTitle(\"Activity Title\");\n\n        setPrimaryColors(\n                getResources().getColor(R.color.primary_color),\n                getResources().getColor(R.color.primary_color_dark)\n        );\n\n        setContent(R.layout.activity_content);\n    }\n}\n```\n\nThis will create an activity with the given title, the primary colors, and whatever is included in the activity_content layout.\n\nYou also need to reference the activity into your AndroidManifest.xml:\n\n```xml\n\u003cactivity\n    android:name=\".NormalActivity\"\n    android:excludeFromRecents=\"true\"\n    android:taskAffinity=\"\"\n    android:theme=\"@style/Theme.Sliding.Light\"/\u003e\n```\n\nMore Details:\nFirst, extend SlidingActivity. Instead of overriding onCreate(), instead override init() and set all of your options for the app there. These options include:\n\n - setTitle()\n - setImage()\n - setContent()\n - setPrimaryColors()\n - setFab()\n - disableHeader()\n - enableFullscreen()\n\nMore examples of possible activities can be found in the sample application and code snippets will be shown below.\n\nYou can configure the scroller before it's initialised by overriding configureScroller(scroller)\n\n```java\n@Override\n    protected void configureScroller(MultiShrinkScroller scroller) {\n        super.configureScroller(scroller);\n        scroller.setIntermediateHeaderHeightRatio(1);\n    }\n```\n\n## Activity Options\n\nMost activity options should be implemented inside init(). You can implement setImage() anywhere after init(), but none of the others should be outside of this method.\n\n#### setTitle()\n\nSetting the title so that it fades into the toolbar as the scrolling occurs is very easy. You can either do:\n\n```java\nsetTitle(R.string.title);\n```\n\nor\n\n```java\nsetTitle(\"Activity Title\");\n```\n\n#### setImage()\n\nYou can either set a drawable resource id or a bitmap as the image:\n\n```java\nsetImage(R.drawable.header_image);\nsetImage(mBitmap);\n```\n\nWhen setting the image for the image, there are two options:\n1) Set it inside init()\n2) Set it outside init()\n\nBoth of these have very different functionality, so it is important to understand the difference.\n\nIf you have a drawable included in your project or already have a bitmap loaded in memory, then it would be best to set the image inside of init(). This will cause the activity colors to change based off of the image and it will show the image when the activity is scrolling up from the bottom.\n\nIf you need to load the image from a url or memory, you should not do this on the main thread. This means you need to set it after you've already initialized the activity. When doing this, the image will be animated in with a circular reveal animation (for lollipop+ users) or a fade in animation. Also, the activity will not look at the image and extract colors from it. It will instead use whatever colors you've set as your primary colors.\n\n#### setContent()\n\nSetting content is handled the same way as setting content in a normal activity. You can either pass a layout resource id or a View:\n\n```java\nsetContent(R.layout.activity_layout);\nsetContent(mView);\n```\n\nAfter you have set the content, it will be available with ```findViewById()```, same as it would with a normal activity.\n\n#### setPrimaryColors()\n\nThe primary color will be used to color the header when no image is present and the primary color dark will be used to color the status bar when the activity has been scrolled all the way to the top of the screen.\n\n```java\nsetPrimaryColors(primaryColor, primaryColorDark);\n```\n\nOne thing to note here, setting an image inside of init() will override these colors. If you wish to continue specifying your own custom colors instead of using the image's extracted colors, call setPrimaryColors() AFTER setImage().\n\n#### setFab()\n\nA floating action button can be shown at the bottom of the expanded toolbar and acted on if you need that for your activity.\n\n```java\nsetFab(mBackgroundColor, R.drawable.fab_image, onClickListener);\n```\n\nWhen the user scrolls and the header begins to shrink, the FAB will be hidden from view. When the header has returned to its original size, the FAB will be shown again.\n\n#### disableHeader()\n\nIf you would like to not show the header on the screen and only have your scrolling content animate up, you can call ```disableHeader()``` inside init().\n\n#### enableFullscreen()\n\nIf you would like to not have the scrolling content animate up onto the screen and leave a little bit of extra room at the top, you can call ```enableFullscreen()``` inside init(). After doing this, the activity can still be slid down to dismiss it.\n\n#### expandFromPoints(int,int,int,int)\n\nThis property creates an [Inbox](https://play.google.com/store/apps/details?id=com.google.android.apps.inbox) style expansion from anywhere on the screen. As with many methods, the parameters are left offset, top offset, width, and height, which describe the size of the box that you want to expand from.\n\n``` java\nIntent intent = getIntent();\nif (intent.getBooleanExtra(SampleActivity.ARG_USE_EXPANSION, false)) {\n    expandFromPoints(\n            intent.getIntExtra(SampleActivity.ARG_EXPANSION_LEFT_OFFSET, 0),\n            intent.getIntExtra(SampleActivity.ARG_EXPANSION_TOP_OFFSET, 0),\n            intent.getIntExtra(SampleActivity.ARG_EXPANSION_VIEW_WIDTH, 0),\n            intent.getIntExtra(SampleActivity.ARG_EXPANSION_VIEW_HEIGHT, 0)\n    );\n}\n```\n\nMy suggestion: in the [SampleActivity.addExpansionArgs(Intent)](https://github.com/klinker41/android-slidingactivity/blob/master/sample/src/main/java/com/klinker/android/sliding/sample/SampleActivity.java) function, you can see that I pass the expansion parameters as extras on the intent. I would recommend using this method to pass the view from the activity under the SlidingActivity, to the SlidingActivity.\n\n#### Theming\n\nTwo themes are included with the library that are specifically created for a SlidingActivity. You can use either ```Theme.Sliding``` or ```Theme.Sliding.Light``` when registering your sliding activity in the AndroidManifest.xml file. You can also use these themes as a parent to your own custom themes and use those instead if you would like.\n\n## Current Apps Using Sliding Activities\n\n - [Talon for Twitter](https://play.google.com/store/apps/details?id=com.klinker.android.twitter_l)\n - [EvolveSMS](https://play.google.com/store/apps/details?id=com.klinker.android.evolve_sms)\n\nIf you're using the library and want to be included in the list, email me at \u003cjake@klinkerapps.com\u003e and I'll get your app added to the list!\n\n## APK Download\n\nIf you'd like to check out the sample app first, you can download an APK [here](https://www.dropbox.com/s/zpr0ykwl07539uq/sliding-activity-sample.apk?dl=0).\n\n## YouTube\n\nMuch higher quality than the GIFs above and more options shown: https://www.youtube.com/watch?v=fWcmy7q09aM\n\n## Contributing\n\nPlease fork this repository and contribute back using [pull requests](https://github.com/klinker41/android-slidingactivity/pulls). Features can be requested using [issues](https://github.com/klinker41/android-slidingactivity/issues). All code, comments, and critiques are appreciated.\n\n## Changelog\n\nThe full changelog for the library can be found [here](https://github.com/klinker41/android-slidingactivity/blob/master/CHANGELOG.md).\n\n## Credits\n\nCredit to the good folks who work on Android. In the contacts app on Lollipop, there is a quick contact activity that was the base implementation for this library. Check it out [here](https://github.com/android/platform_packages_apps_contacts).\n\n## License\n\n    Copyright (C) 2016 Jacob Klinker\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","funding_links":[],"categories":["Index `(light-weight pages)`","Index","Java","Libs","Uncategorized"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget","Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklinker41%2Fandroid-slidingactivity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fklinker41%2Fandroid-slidingactivity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklinker41%2Fandroid-slidingactivity/lists"}