Comments (4)
Fix: added -> containers.get(1).setDraggable(false);
private void executePreSwipeTask() {
containers.getFirst().setContainerEventListener(null);
containers.getFirst().setDraggable(false);
containers.getFirst().setEnabled(false);
containers.get(1).setContainerEventListener(containerEventListener);
containers.get(1).setDraggable(false);
}
from cardstackview.
@artemkutukov Thank you for your report and solution!
The issue can reproduce on my device.
Adding your solution then the issue can't reproduce, but we can't fast swipe...
from cardstackview.
Thank you Yuyakaido for a nice and very helpful library
Got another bug on fast swiping on Lenovo A328
On many fast swipes caught NullPointerException at com.yuyakaido.android.cardstackview.internal.CardContainerView.onTouchEvent(CardContainerView.java:91)
Fixed it this way, works fine, but not sure it's the best way:
public boolean onTouchEvent(MotionEvent event) {
gestureDetector.onTouchEvent(event);
if (!option.isSwipeEnabled || !isDraggable) {
return true;
}
ViewParent vp1;
ViewParent vp2;
switch (MotionEventCompat.getActionMasked(event)) {
case MotionEvent.ACTION_DOWN:
handleActionDown(event);
vp1 = getParent();
if(vp1!=null){
vp2=vp1.getParent();
if(vp2!=null){
vp2.requestDisallowInterceptTouchEvent(true);
}
}
break;
case MotionEvent.ACTION_UP:
handleActionUp(event);
vp1 = getParent();
if(vp1!=null){
vp2=vp1.getParent();
if(vp2!=null){
vp2.requestDisallowInterceptTouchEvent(false);
}
}
break;
case MotionEvent.ACTION_CANCEL:
vp1 = getParent();
if(vp1!=null){
vp2=vp1.getParent();
if(vp2!=null){
vp2.requestDisallowInterceptTouchEvent(false);
}
}
break;
case MotionEvent.ACTION_MOVE:
handleActionMove(event);
break;
}
return true;
}
from cardstackview.
@kutukoff @Hof4eg
Thank you for your information.
This problem has been fixed in ver. 2.0.0.
from cardstackview.
Related Issues (20)
- Solution: Horizontal Scrolling Inside a Card
- How to obscure or add an overlay on top of the stack cards? HOT 1
- When i drag a card others views around the cardstacklayout cover the animation
- Issue when remove jcenter HOT 1
- Failed to resolve: com.yuyakaido.android:card-stack-view:2.3.4 HOT 2
- How to implement onCardClicked(int index) in the RecyclerView items? HOT 2
- Build Error maybe cannot find repo HOT 4
- stackFrom wont work
- No adapter attached; skipping layout HOT 1
- How to show previous card when swipe left HOT 2
- Is ther anyone who ran into 'rendering problems'? HOT 7
- How to disable Right Swipe. HOT 1
- java.lang.IllegalArgumentException Cannot set 'scaleX' to Float.NaN HOT 1
- Dependency from README doesn't work. HOT 2
- Scrollview inside cradStackView automatically get scrolled on swipe HOT 2
- Multiple automatic swipes not working HOT 2
- Vertical Recycler View
- Library not working on targetSdk 34 HOT 9
- Failed to resolve: com.yuyakaido.android:card-stack-view:2.3.4 HOT 7
- How to show next card based on the swipe direction
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cardstackview.