{"id":15475830,"url":"https://github.com/caijinglong/android-reboundscrollview","last_synced_at":"2026-04-18T10:37:20.512Z","repository":{"id":98963432,"uuid":"71342401","full_name":"CaiJingLong/Android-ReboundScrollView","owner":"CaiJingLong","description":null,"archived":false,"fork":false,"pushed_at":"2016-10-19T09:46:37.000Z","size":97,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-04T18:41:54.285Z","etag":null,"topics":["android","pull","scrollview"],"latest_commit_sha":null,"homepage":null,"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/CaiJingLong.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}},"created_at":"2016-10-19T09:45:30.000Z","updated_at":"2022-01-24T10:11:56.000Z","dependencies_parsed_at":"2023-05-02T22:31:21.840Z","dependency_job_id":null,"html_url":"https://github.com/CaiJingLong/Android-ReboundScrollView","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"2c9cc8f82069027816586a93c61876e29bd9f40d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CaiJingLong/Android-ReboundScrollView","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaiJingLong%2FAndroid-ReboundScrollView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaiJingLong%2FAndroid-ReboundScrollView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaiJingLong%2FAndroid-ReboundScrollView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaiJingLong%2FAndroid-ReboundScrollView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CaiJingLong","download_url":"https://codeload.github.com/CaiJingLong/Android-ReboundScrollView/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaiJingLong%2FAndroid-ReboundScrollView/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31966206,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["android","pull","scrollview"],"created_at":"2024-10-02T03:20:33.674Z","updated_at":"2026-04-18T10:37:20.488Z","avatar_url":"https://github.com/CaiJingLong.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"#Android-ReboundScrollView\r\n\r\n## 前言\r\n    本项目为一个可以在scrollview到顶部后，还可以继续下拉的控件\r\n    \r\n## 引用其他第三方类库\r\n    'com.nineoldandroids:library:2.4.0' 兼容API9以下的动画库\r\n    \r\n## 截图\r\n![gif](http://ww4.sinaimg.cn/large/844036b9jw1f24drakv1mg20dc0m813o.gif)\r\n\r\n## 使用时的核心代码\r\n\r\n#### xml\r\n    \u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\r\n    \u003cLinearLayout\r\n        xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n        xmlns:tools=\"http://schemas.android.com/tools\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"match_parent\"\r\n        android:orientation=\"vertical\"\r\n        tools:context=\"com.kikt.parallax.MainActivity\"\u003e\r\n    \r\n        \u003ccom.kikt.reboundscrollview.ReboundScrollView\r\n            android:id=\"@+id/sv_content\"\r\n            android:layout_width=\"match_parent\"\r\n            android:layout_height=\"match_parent\"\u003e\r\n    \r\n            \u003cLinearLayout\r\n                android:layout_width=\"match_parent\"\r\n                android:layout_height=\"wrap_content\"\r\n                android:background=\"#f0f\"\r\n                android:orientation=\"vertical\"\u003e\r\n    \r\n                \u003cFrameLayout\r\n                    android:id=\"@+id/fl_head\"\r\n                    android:layout_width=\"match_parent\"\r\n                    android:layout_height=\"80dp\"\r\n                    android:background=\"#f00\"\u003e\r\n    \r\n                    \u003cImageButton\r\n                        android:layout_width=\"wrap_content\"\r\n                        android:layout_height=\"wrap_content\"\r\n                        android:layout_gravity=\"center\"\r\n                        android:src=\"@mipmap/ic_launcher\"/\u003e\r\n                \u003c/FrameLayout\u003e\r\n    \r\n                \u003cLinearLayout\r\n                    android:layout_width=\"match_parent\"\r\n                    android:layout_height=\"600dp\"\r\n                    android:background=\"#0f0\"/\u003e\r\n    \r\n                \u003cLinearLayout\r\n                    android:layout_width=\"match_parent\"\r\n                    android:layout_height=\"600dp\"\r\n                    android:background=\"#0ff\"/\u003e\r\n    \r\n            \u003c/LinearLayout\u003e\r\n    \r\n        \u003c/com.kikt.reboundscrollview.ReboundScrollView\u003e\r\n    \r\n    \u003c/LinearLayout\u003e\r\n\r\n\r\n#### java\r\n    FrameLayout mFlHead;\r\n    mSvContent.setHeaderView(mFlHead);//设置需要弹性的头布局\r\n    mSvContent.setHeaderView(mFlHead);\r\n        mSvContent.setScrollViewListener(new ObservableScrollView.ScrollViewListener() {\r\n            @Override\r\n            public void onScrollChanged(ObservableScrollView scrollView, int x, int y, int oldx, int oldy) {\r\n            //滚动侦听\r\n            }\r\n        });\r\n\r\n    mSvContent.setCloseDuration(300);//关闭动画的速率\r\n    mSvContent.setMaxHeight(200);//最大的增加高度\r\n    mSvContent.setCanRebound(false);//设定开启弹性功能与否\r\n\r\n    mSvContent.setOnAnimListener(new ReboundScrollView.OnAnimListener() {//侦听动画\r\n        @Override\r\n        public void onAnim(ReboundScrollView scrollView, float fraction, float height) {\r\n            Log.d(\"MainActivity\", \"fraction:\" + fraction);//下拉的百分比\r\n            Log.d(\"MainActivity\", \"height:\" + height);//下拉的高度\r\n        }\r\n    });\r\n\r\n\r\n\r\n## 关于自定义属性\r\n    暂时未加入，后续会考虑加入自定义属性","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaijinglong%2Fandroid-reboundscrollview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaijinglong%2Fandroid-reboundscrollview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaijinglong%2Fandroid-reboundscrollview/lists"}