When use Scroll view then cardstack view dragging disabled. How to enable it?
I am using your library. But In my Adapter, I am using Scroll view to scroll the items in particular card stack. When I use Scroll view then card dragging and swiping get disable. How to enable it?
There is a method for it cardStackView.setSwipeEnabled();
but i think your problem is about scrollview and cards. I'm not sure this code can solve
Have you tried basing your code on this example? from here I tested this with the newest version and it seems to work fine.
public ViewHolder(View itemView) {
super(itemView);
solutions = (TextView) itemView.findViewById(R.id.solutions);
description = (TextView) itemView.findViewById(R.id.description);
scrollable = (ScrollView) itemView.findViewById(R.id.childScroll);
solutions.setOnTouchListener(new View.OnTouchListener() {
public boolean onTouch(View v, MotionEvent event) {
// Disallow the touch request for parent scroll on touch of child view
v.getParent().requestDisallowInterceptTouchEvent(true);
return false;
}
});
}
@kolllor33 this will completely disable the swipes and just enable the scroll.
@yuyakaido Any solution here?
I am also facing the same problem if anybody get solution please help me
If someone still facing this issue in Aug 2020 then surely there is no improvement done in this code.
So the solution to this problem exists. I did some coding and Jugaaad thing to get rid of this problem.
But now I don't have that code right now. but I can help
You need to create an XML layout cell for the card and then in that cell, you need to add again view pager.
so what I'm saying you need a cell of view pager and attach to this library.
so now you have a view pager of this library and in for each item, you have nested view pager at each cell.
so now in nested view pager item, you have to make new XML to reflect data and add scroll view as a parent of this item cell.
This will work.
And if you found any problem or problem with my English I can explain to you again because English is not my primary language.
I have same problem :))