yuqirong / cardswipelayout Goto Github PK
View Code? Open in Web Editor NEWUse RecyclerView to achieve card swipe layout , like Tantan . (模仿探探卡片滑动效果的布局)
License: MIT License
Use RecyclerView to achieve card swipe layout , like Tantan . (模仿探探卡片滑动效果的布局)
License: MIT License
I need swipe library i should be work on vertical and horizontal scroll
@OverRide
public void onSwiped(RecyclerView.ViewHolder viewHolder, Image.DataBean img, int direction) {
Logger.i("index = " + viewHolder.getLayoutPosition()); // index = 0
Logger.i("index = " + mData.indexOf(img)); // index = -1 mData是数据源
Logger.i("index = " + adapter.getItemCount()); // index = 10 正常
if (adapter.getItemCount() == 5) {
pageindex++;
getData();
snackbar.show((MainActivity) mContext);
}
}
如果是清空之后在加载图片的话体验不是很好
没有直接的点击事件
请原谅我直接下载了代码 进行修改
求解
<RelativeLayout>
<Recyclerview> 全屏
<Button> 右下角
<RelativeLayout>
上面的伪代码,button无法触发onClickLisener
卡片是不存在点击事件的,你若是想加上但是没有down事件,楼主有没有什么好的解决办法.
LayoutManager里面已经对view进行缩放,CardItemTouchHelperCallback的onChildDraw()里没有必要再次对下面的view进行缩放了。
发现的一个问题:下拉以及上滑出现图片闪烁,希望可以及时修正
in my application i have to used this library but card will neither swiped right nor swiped left.
我在三星s8上 点击事件和卡片滑动有冲突
这个recycleview的点击事件和普通的recycleview用法一样么
能不能主动触发左滑动,和右滑动啊。点击一个button,直接执行左或者右滑,和探探一样
仿tantan的。我要用网络的图片 或者本地的图片 这该咋整?我看你的 这个 貌似只有 内置资源可以用
滑动的时候,就算数据很多,有时也会展示只有两个item重叠的情况(正常是3个item重叠)。导致下面的层次看起来很别扭
在item里面放一个比屏幕大的布局不能上下滑动的问题怎么解决
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.puncheers.questions, PID: 26450
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.remove(ArrayList.java:503)
at me.yuqirong.cardswipelayout.CardItemTouchHelperCallback.onSwiped(CardItemTouchHelperCallback.java:64)
at android.support.v7.widget.helper.ItemTouchHelper$4.run(ItemTouchHelper.java:686)
at android.os.Handler.handleCallback(Handler.java:808)
at android.os.Handler.dispatchMessage(Handler.java:101)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7425)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
E/RecyclerView: You must override onLayoutChildren(Recycler recycler, State state)
当图片是异步加载出来的时候,图片无法预加载,Top图片在滑动的时候,看到的下一张图片和Top图片一样,Top图片滑完后,后面的真实的图片才会加载出来,这样就造成了图片会闪一下的现象。
请问怎么做数据加载呢 就是类似分页一样 比如我开始获取了10条 滑完 在哪个方法里面加载呢
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.