Ejemplo n.º 1
0
  /**
   * draw top/left half
   *
   * @param canvas
   */
  private void drawPreviousHalf(Canvas canvas) {
    final View v = viewForPage(getCurrentPageFloor());

    canvas.save();
    canvas.clipRect(isFlippingVertically() ? mTopRect : mLeftRect);

    // if the view does not exist, skip drawing it
    if (v != null) {
      setDrawWithLayer(v, true);
      v.draw(canvas);
    }

    drawPreviousShadow(canvas);
    canvas.restore();
  }