Add SlidingCard with Fragment !
Noobknight opened this issue · comments
Hi ! :)
First, you've provided a library very useful and I'm thank for that ^^!
And you can support SlidingCard with Fragment ?
you can use it in Fragment the same with in Activity.
do you mean this?
But.. when i use Fragment it not sliding cards...
class cast exception when using in fragment
@adavanayyappan Fix error it by change params in function initCardView to public void initCardView(final Fragment fragment,int layoutId,int rootId)
It work fine... But card not sliding !
thanks @Noobknight you fix the error its working nicely
do you put the SlidingCard in listview or viewpager?
used in fragment oncreate view thanks for nice tutorial
@adavanayyappan Working... But you can sliding cards (can Touch card ? )
@Noobknight if you put it in scrollable viewgroup like listview ,viewpager etc...sliding will not work .
Solution is don't use 'compile 'com.mxn.soul:slidingcard-core:1.2.0' ' and copy the library to your application. then see the Annotation
// private ViewPager mPager;
// private ListView listView;
// public void setPagerAndListView(ViewPager mPager, ListView listView) {
// this.mPager = mPager;
// this.listView = listView;
// @OverRide
// public boolean dispatchTouchEvent(@nonnull MotionEvent ev) {
// mPager.requestDisallowInterceptTouchEvent(true);
// listView.requestDisallowInterceptTouchEvent(true);
// return super.dispatchTouchEvent(ev);
// }
// @OverRide
// public boolean onInterceptTouchEvent(MotionEvent ev) {
// mPager.requestDisallowInterceptTouchEvent(true);
// listView.requestDisallowInterceptTouchEvent(true);
// return super.onInterceptTouchEvent(ev);
// }
// @OverRide
// public boolean onTouchEvent(@nonnull MotionEvent event) {
// mPager.requestDisallowInterceptTouchEvent(true);
// listView.requestDisallowInterceptTouchEvent(true);
// return super.onTouchEvent(event);
// }
@mxn21 OK... I will try again :)
yes its working i can slide the cards @Noobknight
@adavanayyappan, @mxn21 working fine :)
@Noobknight ok
.
can i swipe cards vertically @mxn21
@adavanayyappan no ,sadly , only drag horizontally so far
its ok thanks for your nice library @mxn21