List of effects:
Imitation Tantan, Renren film and television card stacking dazzling sliding layout
The sense of sight when the emperor flips the brand
Renrenmei Drama Subscription Interface
Configurable parameters (6 pages displayed simultaneously):
Emma, it looks a lot better after replacing it with a girl picture. I don't even know it anymore. Well, it usually looks like this in the project:
Usually this effect, we generally use a custom ViewGroup to achieve, I also wrote one before. Customize VG to achieve flow layout
use:
Step 1. Add the JitPack repository dependency in the project root build.gradle file.
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
Step 2. Add the dependency
dependencies {
compile 'com.github.mcxtzhang:ZLayoutManager:V1.1.0'
}
Step 3. Imitation Tantan, Renren video card stacking dazzling sliding layout :
After the boss asks you to do this effect, you only need to:
mRv.setLayoutManager(new OverLayCardLayoutManager());
CardConfig.initConfig(this);
ItemTouchHelper.Callback callback = new RenRenCallback(mRv, mAdapter, mDatas);
ItemTouchHelper itemTouchHelper = new ItemTouchHelper(callback);
itemTouchHelper.attachToRecyclerView(mRv);
If you need to customize special parameters, such as display 6 layers:
CardConfig.MAX_SHOW_COUNT = 6;
Set Imitation Tantan to slide up and down vertically without deleting items.
Horizontal direction judgment error threshold x:
final TanTanCallback callback = new TanTanCallback(mRv, mAdapter, mDatas);
callback.setHorizontalDeviation(x);
mRv.setLayoutManager(new FlowLayoutManager());