mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-05 19:42:17 +02:00
animation bug fixes
This commit is contained in:
parent
2ffab8151b
commit
208eeb2efa
4 changed files with 22 additions and 20 deletions
|
@ -68,7 +68,6 @@ abstract class AnimationProvider {
|
|||
}
|
||||
|
||||
void startAutoScrolling(boolean forward, float startSpeed, ZLView.Direction direction, int w, int h, Integer x, Integer y, int speed) {
|
||||
System.err.println("starting: " + forward + " " + startSpeed + " " + direction + " " + w + " " + h + " " + x + " " + y + " " + speed);
|
||||
if (!inProgress()) {
|
||||
if (x == null || y == null) {
|
||||
if (direction.IsHorizontal) {
|
||||
|
|
|
@ -118,6 +118,7 @@ class CurlAnimationProvider extends AnimationProvider {
|
|||
myFgPath.lineTo(x1 - sX, cornerY);
|
||||
myFgPath.quadTo(x1, cornerY, (x + x1) / 2, (y + cornerY) / 2);
|
||||
canvas.drawPath(myFgPath, myEdgePaint);
|
||||
canvas.save();
|
||||
canvas.clipPath(myFgPath);
|
||||
canvas.drawBitmap(fgBitmap, 0, 0, myPaint);
|
||||
canvas.restore();
|
||||
|
@ -166,6 +167,7 @@ class CurlAnimationProvider extends AnimationProvider {
|
|||
);
|
||||
|
||||
canvas.drawPath(myEdgePath, myEdgePaint);
|
||||
canvas.save();
|
||||
canvas.clipPath(myEdgePath);
|
||||
final Matrix m = new Matrix();
|
||||
m.postScale(1, -1);
|
||||
|
|
|
@ -77,7 +77,6 @@ abstract class SimpleAnimationProvider extends AnimationProvider {
|
|||
} else {
|
||||
bound = 0;
|
||||
}
|
||||
System.err.println("before check: " + mySpeed + " " + getScrollingShift() + " " + bound);
|
||||
if (mySpeed > 0) {
|
||||
if (getScrollingShift() >= bound) {
|
||||
if (myDirection.IsHorizontal) {
|
||||
|
|
|
@ -265,7 +265,12 @@ public class ZLAndroidWidget extends View implements View.OnLongClickListener {
|
|||
private void drawFooter(Canvas canvas) {
|
||||
final ZLView view = ZLApplication.Instance().getCurrentView();
|
||||
final ZLView.FooterArea footer = view.getFooterArea();
|
||||
if (footer != null) {
|
||||
|
||||
if (footer == null) {
|
||||
myFooterBitmap = null;
|
||||
return;
|
||||
}
|
||||
|
||||
if (myFooterBitmap != null &&
|
||||
(myFooterBitmap.getWidth() != getWidth() ||
|
||||
myFooterBitmap.getHeight() != footer.getHeight())) {
|
||||
|
@ -281,10 +286,7 @@ public class ZLAndroidWidget extends View implements View.OnLongClickListener {
|
|||
view.isScrollbarShown() ? getVerticalScrollbarWidth() : 0
|
||||
);
|
||||
footer.paint(context);
|
||||
canvas.drawBitmap(myFooterBitmap, 0, getMainAreaHeight(), myPaint);
|
||||
} else {
|
||||
myFooterBitmap = null;
|
||||
}
|
||||
canvas.drawBitmap(myFooterBitmap, 0, getHeight() - footer.getHeight(), myPaint);
|
||||
}
|
||||
|
||||
private void onDrawStatic(Canvas canvas) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue