android-flip
android-flip copied to clipboard
Horizontal flipping occurs when flinging up/down
First, awesome library! I have a scrollview inside my fragments and I have it set to horizontal flipping. But I have to be very precise on scrolling through the scrollview or else it will flip to another card. Is there a setting I'm missing to get better control of this?
Thanks!
I'm new to Android, but I ended up adding this. to FlipCards.java
case MotionEvent.ACTION_MOVE:
float HOR_MOVE = 160f;
float hDelta = lastPosition - event.getX();
Log.e("hdelta",String.valueOf(hDelta));
if(Math.abs(hDelta) < HOR_MOVE && !this.movedEnough) {
return false;
}
this.movedEnough = true;
float delta = orientationVertical ? (lastPosition - event.getY()) : (lastPosition - event.getX());
and then on ACTION_UP I reset this.movedEnough back to False. Any suggestions on how I could improve this? It seems to work okay.
I'm sorry ,I am new to Android,too.I need to review the codes carefully,then maybe I can give some suggestions.
At 2013-04-18 00:48:46,"Ramin Mahmoodi" [email protected] wrote:
I'm new to Android, but I ended up adding this. to FlipCards.java
caseMotionEvent.ACTION_MOVE:floatHOR_MOVE=160f;floathDelta=lastPosition-event.getX();Log.e("hdelta",String.valueOf(hDelta));if(Math.abs(hDelta)<HOR_MOVE&&!this.movedEnough){returnfalse;}this.movedEnough=true;floatdelta=orientationVertical?(lastPosition-event.getY()):(lastPosition-event.getX());
and then on ACTION_UP I reset this.movedEnough back to False. Any suggestions on how I could improve this? It seems to work okay.
¡ª Reply to this email directly or view it on GitHub.
I also found out that flipping in Flipboard could also be over sensitive.
I'll try to improve it later