{"id":20173725,"url":"https://github.com/codeestx/ecardflow","last_synced_at":"2026-03-16T23:35:36.393Z","repository":{"id":135858050,"uuid":"79019162","full_name":"codeestX/ECardFlow","owner":"codeestX","description":":lollipop:A custom ViewPager for multiple card flow system. \u0026\u0026 A layout which provide beautiful background effects for ViewPager.","archived":false,"fork":false,"pushed_at":"2017-03-20T16:28:11.000Z","size":71767,"stargazers_count":44,"open_issues_count":1,"forks_count":18,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T03:17:33.821Z","etag":null,"topics":["background-image","blur","cardview","custom-viewpager","effects","viewpager"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codeestX.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":"2017-01-15T09:24:52.000Z","updated_at":"2024-10-20T08:20:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"0d5adcf3-032a-45a4-ac1e-a0a418b4b419","html_url":"https://github.com/codeestX/ECardFlow","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeestX%2FECardFlow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeestX%2FECardFlow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeestX%2FECardFlow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeestX%2FECardFlow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeestX","download_url":"https://codeload.github.com/codeestX/ECardFlow/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248148247,"owners_count":21055548,"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":["background-image","blur","cardview","custom-viewpager","effects","viewpager"],"created_at":"2024-11-14T01:37:37.528Z","updated_at":"2026-03-16T23:35:31.373Z","avatar_url":"https://github.com/codeestX.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ECardFlow\n\n[![](https://jitpack.io/v/codeestX/ECardFlow.svg)](https://jitpack.io/#codeestX/ECardFlow)\n\nECardFlow, A custom ViewPager for multiple card flow system.designed by [Leo Leung](https://ios.uplabs.com/posts/multiple-card-flow\n)  \nECardFlow, 一个用于复数卡片滑动与展开效果的ViewPager控件，设计原型出自[Leo Leung](https://ios.uplabs.com/posts/multiple-card-flow\n)  \n\nECardFlowLayout, A layout provide beautiful background effect for ViewPager.  \nECardFlowLayout, 一个为ViewPager提供多种联动背景效果的布局\n\n# Preview\n\u003cb\u003eECardFlow:\u003c/b\u003e  \n\n![](https://github.com/codeestX/ECardFlow/raw/master/preview/GIF.gif)  \n\n\u003cb\u003eECardFlowLayout:\u003c/b\u003e  \n\n![](https://github.com/codeestX/ECardFlow/raw/master/preview/GIFBlur.gif)\n![](https://github.com/codeestX/ECardFlow/raw/master/preview/GIFMove.gif)\n\n# Usage(ECardFlow)\n\nStep 1. Add the JitPack repository to your build file\n\n\tallprojects {\n\t\trepositories {\n\t\t\t...\n\t\t\tmaven { url \"https://jitpack.io\" }\n\t\t}\n\t}\n   \nStep 2. Add the dependency\n\n\tdependencies {\n\t        compile 'com.github.codeestX:ECardFlow:v1.0.5'\n\t}\n\t\nStep 3. Just use it as a ViewPager\n\n\t\u003cmoe.codeest.ecardflow.ECardFlow\n\t        android:id=\"@+id/ecardflow\"\n\t        android:layout_width=\"280dp\"\n\t        android:layout_height=\"match_parent\"\n\t        app:expandMode=\"slide_up\"\n\t        app:expandTime=\"700\"\n\t        app:switchTime=\"1200\"\n\t        app:preloadPageNum=\"3\"\n\t        app:maxRotateY=\"5\"\u003e\n\n* Only support fragment as each page\n* For best performance, giving ECardFlow's parent view an attr`android:clipChildren=\"false\"`,and do `NOT` set ECardFlow's width as`match_parent`\n* See DemoProject for more details\n\nAttrs:\n\n\t\u003cdeclare-styleable name=\"attr\"\u003e\n        \u003c!-- Page switching time, default 1200ms --\u003e\n        \u003cattr name=\"switchTime\" format=\"integer\" /\u003e\n\n        \u003c!-- Page expanding time, default 700ms --\u003e\n        \u003cattr name=\"expandTime\" format=\"integer\" /\u003e\n\n        \u003c!-- Page expanding mode, click or slide up to expand, default slide_up --\u003e\n        \u003cattr name=\"expandMode\"\u003e\n            \u003cenum name=\"slide_up\" value=\"10\" /\u003e\n            \u003cenum name=\"click\" value=\"11\" /\u003e\n        \u003c/attr\u003e\n\n        \u003c!-- The number of pages outside the screen, default 3 --\u003e\n        \u003cattr name=\"preloadPageNum\" format=\"integer\" /\u003e\n\n        \u003c!-- The shortest sliding distance to trigger the switch, default context.getScaledTouchSlop() --\u003e\n        \u003cattr name=\"touchSlop\" format=\"integer\" /\u003e\n\n        \u003c!-- The maximum angle of rotation, default 5 --\u003e\n        \u003cattr name=\"maxRotateY\" format=\"integer\" /\u003e\n    \u003c/declare-styleable\u003e\n\nJava Code:\n\n\tmEcardflow.gotoNext();\n\t\n\tmEcardflow.gotoLast();\n\t\n\tmEcardflow.expand();\n\t\n\tmEcardflow.shrink();\n\t\n\tmEcardflow.isExpanding();\n\t\n\tmEcardflow.setTouchSlop(slop);\n\t\n\tmEcardflow.setExpandTime(time);\n\t\n\tmEcardflow.setOnExpandStateListener(new ECardFlow.OnExpandStateListener() {\n\t            @Override\n\t            public void onExpand(View page, int position) {\n\t           \n\t            }\n\t\n\t            @Override\n\t            public void onShrink(View page, int position) {\n\t          \n\t            }\n\t        });\n\t        \n# Usage(ECardFlowLayout)\nStep 1. Add the JitPack repository to your build file\n\n\tallprojects {\n\t\trepositories {\n\t\t\t...\n\t\t\tmaven { url \"https://jitpack.io\" }\n\t\t}\n\t}\n   \nStep 2. Add the dependency\n\n\tdependencies {\n\t        compile 'com.github.codeestX:ECardFlow:v1.0.5'\n\t}\n\t\nStep 3. Just put a ViewPager in ECardFlowLayout \n\n\t\u003cmoe.codeest.ecardflow.ECardFlowLayout\n\t    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\t    android:id=\"@+id/ecardflow_layout\"\n\t    android:layout_width=\"match_parent\"\n\t    android:layout_height=\"match_parent\"\n\t    android:clipChildren=\"false\"\u003e\n\t    \u003candroid.support.v4.view.ViewPager\n\t        android:id=\"@+id/viewpager\"\n\t        android:layout_width=\"240dp\"\n\t        android:layout_height=\"270dp\"\n\t        android:layout_gravity=\"center_horizontal|bottom\"\n\t        android:layout_marginBottom=\"80dp\"/\u003e\n\t\u003c/moe.codeest.ecardflow.ECardFlowLayout\u003e\n\nStep 4. setAnimMode \u0026 setImageProvider\n\n\tmVPLayout = (ECardFlowLayout) findViewById(R.id.ecardflow_layout);\n\tmVPLayout.setAnimMode(new BlurAnimMode());\n\tmVPLayout.setImageProvider(new DrawableImageProvider(this, res, width, height);\n\n* Set AnimMode before Set ImageProvider\n* Use `mVPLayout.onDestroy();` to release source\n* See DemoProject for more details\n\nAttrs:  \n\n\t\u003cdeclare-styleable name=\"attr_layout\"\u003e\n        \u003c!-- The duration of Page switching animation, default 300ms --\u003e\n        \u003cattr name=\"switchAnimTime\" format=\"integer\" /\u003e\n    \u003c/declare-styleable\u003e\n    \nJava Code:\n\n\t\tmVPLayout.setImageProvider(imageProvider);\n\t\t\n\t\tmVPLayout.setAnimMode(animMode);\n\t\t\n\t\tmVPLayout.setSwitchAnimTime(time);\n\t\t\n\t\t//maxSize = Runtime.getRuntime().maxMemory();\n\t\t//default: maxSize / 5\n\t\t//min: maxSize / 8\n\t\tmVPLayout.setCacheSize(megabytes);\n\t\t\n\t\tmVPLayout.onDestroy();\n\t\n    \n| AnimMode      | Des           |\n|:-------------:|:-------------:|\n| DefaultAnimMode  | No Effect   |\n| BlurAnimMode | Blur Effect     |\n| MoveAnimMode | Parallax Effect |\n| ScaleAnimMode | Scale Effect |\n| CrossMoveAnimMode | Cross Parallax Effect |\n\nYou can custom AnimMode with class which implements `AnimMode`\n\n| ImageProvider      | Des           |\n|:-------------:|:-------------:|\n| DrawableImageProvider  | Prividing resId(R.drawable/mipmap.xx) as image resource |\n| PathImageProvider | Prividing file path as image resource     |\n| FileImageProvider | Prividing `File` as image resource |\n\nYou can custom ImageProvider with class which implements `ImageProvider`\n  \nIf you choose `BlurAnimMode`, you can enable `RenderScript` for a high performance.\n\u003e Open the build.gradle file in the app folder of your application module.  \n\u003e Add the following RenderScript settings to the file:  \n\u003e \n\u003e \t\tandroid {\n\u003e\t    \tcompileSdkVersion 23\n\u003e\t    \tbuildToolsVersion \"23.0.3\"\n\u003e\t\n\u003e\t    defaultConfig {\n\u003e\t        minSdkVersion 9\n\u003e\t        targetSdkVersion 19\n\u003e\t\n\u003e\t\t\t//Enable RenderScript\n\u003e\t        renderscriptTargetApi 23\n\u003e\t        renderscriptSupportModeEnabled true\n\u003e\t    \t}\n\u003e\t\t}\n\u003e\n\n# [Download Demo APK](https://fir.im/yl3e)\n\n# License\n\n      MIT Copyright (c) 2017 codeestX\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeestx%2Fecardflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeestx%2Fecardflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeestx%2Fecardflow/lists"}