All Projects → codeestX → ECardFlow

codeestX / ECardFlow

Licence: MIT license
🍭A custom ViewPager for multiple card flow system. && A layout which provide beautiful background effects for ViewPager.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to ECardFlow

Swiftuiimageeffects
Swift port of Apple UIImage+UIImageEffecs category.
Stars: ✭ 213 (+353.19%)
Mutual labels:  effects, blur
Cardslideview
一行代码实现ViewPager卡片效果,比ViewPager2更强大,底层同样是RecyclerView
Stars: ✭ 301 (+540.43%)
Mutual labels:  viewpager, cardview
RainbowTaskbar
Customizable Windows taskbar effects.
Stars: ✭ 39 (-17.02%)
Mutual labels:  effects, blur
Pagetransformerhelp
👍 A PageTransformer library for Android ViewPager,have some Banner styles. ViewPager 实现轮播图、实现卡片切换。
Stars: ✭ 478 (+917.02%)
Mutual labels:  viewpager, cardview
Glasscord
[BUGFIXES ONLY, SUPPORT WILL DROP MAR 1, 2021] Injecting composition effects into Electron applications!
Stars: ✭ 737 (+1468.09%)
Mutual labels:  effects, blur
Super Blur
Screen and UI gaussian blur for Unity
Stars: ✭ 543 (+1055.32%)
Mutual labels:  effects, blur
Viewpagercards
ViewPager cards inspired by Duolingo
Stars: ✭ 4,040 (+8495.74%)
Mutual labels:  viewpager, cardview
Visualeffectview
Dynamic blur background view with tint color (UIVisualEffectView subclass) 📱
Stars: ✭ 795 (+1591.49%)
Mutual labels:  effects, blur
DynamicViewPagerDemo
ViewPager单屏显示多页面,动画效果
Stars: ✭ 49 (+4.26%)
Mutual labels:  viewpager, cardview
sic
🦜 Accessible image processing and conversion from the terminal. Front-end for image-rs/image.
Stars: ✭ 96 (+104.26%)
Mutual labels:  blur
LuxVilla
project with recycleview cardview and other things
Stars: ✭ 18 (-61.7%)
Mutual labels:  cardview
Android-Universal-ViewPager-Indicator
Android Universal ViewPager Indicator
Stars: ✭ 41 (-12.77%)
Mutual labels:  viewpager
vuepress-plugin-cursor-effects
🎉 Add a cute click effect to your mouse in your vuepress!
Stars: ✭ 18 (-61.7%)
Mutual labels:  effects
zio-http4s-example
For anyone who's struggling to put an http4s server together with ZIO
Stars: ✭ 19 (-59.57%)
Mutual labels:  effects
shuffle-text
"shuffle-text" is JavaScript text effect library such as cool legacy of Flash.
Stars: ✭ 93 (+97.87%)
Mutual labels:  effects
Unblur-Scribd
Clear the blur and show the images in scribd.com page.
Stars: ✭ 26 (-44.68%)
Mutual labels:  blur
limitless-engine
OpenGL C++ Graphics Engine
Stars: ✭ 95 (+102.13%)
Mutual labels:  effects
skyline
Some canvas experiments... like drawing a procedurally generated skyline. Also featuring fun explosions :D
Stars: ✭ 24 (-48.94%)
Mutual labels:  effects
Kawase
Kawase dual filter blur for GameMaker Studio 2
Stars: ✭ 23 (-51.06%)
Mutual labels:  blur
infinite view pager
📜Infinite View Pager widget for Flutter
Stars: ✭ 26 (-44.68%)
Mutual labels:  viewpager

ECardFlow

ECardFlow, A custom ViewPager for multiple card flow system.designed by Leo Leung
ECardFlow, 一个用于复数卡片滑动与展开效果的ViewPager控件,设计原型出自Leo Leung

ECardFlowLayout, A layout provide beautiful background effect for ViewPager.
ECardFlowLayout, 一个为ViewPager提供多种联动背景效果的布局

Preview

ECardFlow:

ECardFlowLayout:

Usage(ECardFlow)

Step 1. Add the JitPack repository to your build file

allprojects {
	repositories {
		...
		maven { url "https://jitpack.io" }
	}
}

Step 2. Add the dependency

dependencies {
        compile 'com.github.codeestX:ECardFlow:v1.0.5'
}

Step 3. Just use it as a ViewPager

<moe.codeest.ecardflow.ECardFlow
        android:id="@+id/ecardflow"
        android:layout_width="280dp"
        android:layout_height="match_parent"
        app:expandMode="slide_up"
        app:expandTime="700"
        app:switchTime="1200"
        app:preloadPageNum="3"
        app:maxRotateY="5">
  • Only support fragment as each page
  • For best performance, giving ECardFlow's parent view an attrandroid:clipChildren="false",and do NOT set ECardFlow's width asmatch_parent
  • See DemoProject for more details

Attrs:

<declare-styleable name="attr">
    <!-- Page switching time, default 1200ms -->
    <attr name="switchTime" format="integer" />

    <!-- Page expanding time, default 700ms -->
    <attr name="expandTime" format="integer" />

    <!-- Page expanding mode, click or slide up to expand, default slide_up -->
    <attr name="expandMode">
        <enum name="slide_up" value="10" />
        <enum name="click" value="11" />
    </attr>

    <!-- The number of pages outside the screen, default 3 -->
    <attr name="preloadPageNum" format="integer" />

    <!-- The shortest sliding distance to trigger the switch, default context.getScaledTouchSlop() -->
    <attr name="touchSlop" format="integer" />

    <!-- The maximum angle of rotation, default 5 -->
    <attr name="maxRotateY" format="integer" />
</declare-styleable>

Java Code:

mEcardflow.gotoNext();

mEcardflow.gotoLast();

mEcardflow.expand();

mEcardflow.shrink();

mEcardflow.isExpanding();

mEcardflow.setTouchSlop(slop);

mEcardflow.setExpandTime(time);

mEcardflow.setOnExpandStateListener(new ECardFlow.OnExpandStateListener() {
            @Override
            public void onExpand(View page, int position) {
           
            }

            @Override
            public void onShrink(View page, int position) {
          
            }
        });

Usage(ECardFlowLayout)

Step 1. Add the JitPack repository to your build file

allprojects {
	repositories {
		...
		maven { url "https://jitpack.io" }
	}
}

Step 2. Add the dependency

dependencies {
        compile 'com.github.codeestX:ECardFlow:v1.0.5'
}

Step 3. Just put a ViewPager in ECardFlowLayout

<moe.codeest.ecardflow.ECardFlowLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/ecardflow_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:clipChildren="false">
    <android.support.v4.view.ViewPager
        android:id="@+id/viewpager"
        android:layout_width="240dp"
        android:layout_height="270dp"
        android:layout_gravity="center_horizontal|bottom"
        android:layout_marginBottom="80dp"/>
</moe.codeest.ecardflow.ECardFlowLayout>

Step 4. setAnimMode & setImageProvider

mVPLayout = (ECardFlowLayout) findViewById(R.id.ecardflow_layout);
mVPLayout.setAnimMode(new BlurAnimMode());
mVPLayout.setImageProvider(new DrawableImageProvider(this, res, width, height);
  • Set AnimMode before Set ImageProvider
  • Use mVPLayout.onDestroy(); to release source
  • See DemoProject for more details

Attrs:

<declare-styleable name="attr_layout">
    <!-- The duration of Page switching animation, default 300ms -->
    <attr name="switchAnimTime" format="integer" />
</declare-styleable>

Java Code:

	mVPLayout.setImageProvider(imageProvider);
	
	mVPLayout.setAnimMode(animMode);
	
	mVPLayout.setSwitchAnimTime(time);
	
	//maxSize = Runtime.getRuntime().maxMemory();
	//default: maxSize / 5
	//min: maxSize / 8
	mVPLayout.setCacheSize(megabytes);
	
	mVPLayout.onDestroy();
AnimMode Des
DefaultAnimMode No Effect
BlurAnimMode Blur Effect
MoveAnimMode Parallax Effect
ScaleAnimMode Scale Effect
CrossMoveAnimMode Cross Parallax Effect

You can custom AnimMode with class which implements AnimMode

ImageProvider Des
DrawableImageProvider Prividing resId(R.drawable/mipmap.xx) as image resource
PathImageProvider Prividing file path as image resource
FileImageProvider Prividing File as image resource

You can custom ImageProvider with class which implements ImageProvider

If you choose BlurAnimMode, you can enable RenderScript for a high performance.

Open the build.gradle file in the app folder of your application module.
Add the following RenderScript settings to the file:

  android {
  	compileSdkVersion 23
  	buildToolsVersion "23.0.3"

  defaultConfig {
      minSdkVersion 9
      targetSdkVersion 19

  	//Enable RenderScript
      renderscriptTargetApi 23
      renderscriptSupportModeEnabled true
  	}
  }

Download Demo APK

License

  MIT Copyright (c) 2017 codeestX
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].