{"id":15031593,"url":"https://github.com/wuyr/pathlayoutmanager","last_synced_at":"2025-04-08T10:30:11.872Z","repository":{"id":37412758,"uuid":"134978832","full_name":"wuyr/PathLayoutManager","owner":"wuyr","description":"RecyclerView的LayoutManager，轻松实现各种炫酷、特殊效果，再也不怕产品经理为难！ ","archived":false,"fork":false,"pushed_at":"2021-10-29T23:07:38.000Z","size":32867,"stargazers_count":2045,"open_issues_count":8,"forks_count":251,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-04-01T09:24:13.270Z","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/wuyr.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}},"created_at":"2018-05-26T16:48:22.000Z","updated_at":"2025-03-30T02:12:24.000Z","dependencies_parsed_at":"2022-07-08T01:30:59.386Z","dependency_job_id":null,"html_url":"https://github.com/wuyr/PathLayoutManager","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/wuyr%2FPathLayoutManager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wuyr%2FPathLayoutManager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wuyr%2FPathLayoutManager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wuyr%2FPathLayoutManager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wuyr","download_url":"https://codeload.github.com/wuyr/PathLayoutManager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247823481,"owners_count":21002082,"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-09-24T20:16:07.827Z","updated_at":"2025-04-08T10:30:11.834Z","avatar_url":"https://github.com/wuyr.png","language":"Java","readme":"##  RecyclerView的LayoutManager，轻松实现各种炫酷、特殊效果，再也不怕产品经理为难！\n### 博客详情： https://blog.csdn.net/u011387817/article/details/81875021\n\n### 使用方式:\n#### 添加依赖：\n```\nimplementation 'com.wuyr:pathlayoutmanager:1.0.3'\n```\n\n### APIs:\n|Method|Description|\n|------|-----------|\n|updatePath(Path path)|更新Path|\n|setItemOffset(int itemOffset)|设置Item间距 (单位: px)|\n|setOrientation(int orientation)|设置滑动方向:\u003cbr\u003e**RecyclerView.HORIZONTAL** (水平滑动)\u003cbr\u003e**RecyclerView.VERTICAL** (垂直滑动)|\n|setScrollMode(int mode)|设置滚动模式:\u003cbr\u003e**SCROLL_MODE_NORMAL** (普通模式)\u003cbr\u003e**SCROLL_MODE_OVERFLOW** (允许溢出)\u003cbr\u003e**SCROLL_MODE_LOOP** (无限循环)\u003cbr\u003e|\n|setItemDirectionFixed(boolean isFixed)|设置Item是否保持垂直|\n|setAutoSelect(boolean isAutoSelect)|设置是否开启自动选中效果|\n|setAutoSelectFraction(float position)|设置自动选中的目标落点 (0~1)|\n|setFlingEnable(boolean enable)|设置惯性滚动是否开启|\n|setCacheCount(int count)|设置Item缓存个数|\n|setItemScaleRatio(float... ratios)|设置平滑缩放比例\u003cbr\u003e**ratios**: 缩放比例， 数组长度必须是双数，\u003cbr\u003e**偶数索引**表示要**缩放的比例**\u003cbr\u003e**奇数索引**表示在**路径上的位置** (0~1)\u003cbr\u003e奇数索引必须要递增，即越往后的数值应越大\u003cbr\u003e例如：\u003cbr\u003e **setItemScaleRatio(0.8, 0.5)** \u003cbr\u003e表示在路径的50%处把Item缩放到原来的80%\u003cbr\u003e**setItemScaleRatio(0, 0, 1, 0.5, 0, 1)** \u003cbr\u003e表示在起点处的Item比例是原来的0%，在路径的50%处会恢复原样\u003cbr\u003e到路径终点处会缩小到0%|\n|scrollToPosition(int position)|将目标Item滚动到自动选中的落点(setAutoSelectFraction)\u003cbr\u003e例如 setAutoSelectFraction(0) 则滚动到Path的起点处\u003cbr\u003e若为1，则滚动到路径终点处，0.6则路径的60%处 (默认: 0.5)|\n|smoothScrollToPosition(int position)|同上，此方法为平滑滚动，即选中时会播放动画 \u003cbr\u003e动画时长通过 setFixingAnimationDuration 方法来设置|\n|setFixingAnimationDuration(long duration)|设置自动选中后的选中动画时长|\n|setOnItemSelectedListener(Listener listener)|设置Item被选中后的监听器 (需开启自动选中才生效)|\n\n\n### 使用示例：\n```java\n    mPathLayoutManager = new PathLayoutManager(path, itemOffset);\n    mRecyclerView.setLayoutManager(mPathLayoutManager);\n```\n\n### Demo下载: [app-debug.apk](https://github.com/wuyr/PathLayoutManager/raw/master/app-debug.apk)\n### 库源码地址： https://github.com/Ifxcyr/PathLayoutManager\n\n### 效果：\n![preview](https://github.com/wuyr/PathLayoutManager/raw/master/previews/preview.gif) ![preview](https://github.com/wuyr/PathLayoutManager/raw/master/previews/preview2.gif)\n![preview](https://github.com/wuyr/PathLayoutManager/raw/master/previews/preview3.gif) ![preview](https://github.com/wuyr/PathLayoutManager/raw/master/previews/preview4.gif)\n![preview](https://github.com/wuyr/PathLayoutManager/raw/master/previews/preview7.gif) ![preview](https://github.com/wuyr/PathLayoutManager/raw/master/previews/preview8.gif)\n![preview](https://github.com/wuyr/PathLayoutManager/raw/master/previews/preview5.gif) ![preview](https://github.com/wuyr/PathLayoutManager/raw/master/previews/preview6.gif)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwuyr%2Fpathlayoutmanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwuyr%2Fpathlayoutmanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwuyr%2Fpathlayoutmanager/lists"}