小编Diy*_*iya的帖子

PDFRenderer缩放和翻转

我的PDF渲染器有以下问题 -

  1. 当我缩放图像视图时,页面会随着页面移动到下一页或上一页而缩放..页面未被保留..
  2. 我已经使用xml实现了翻转,并且使用手势监听器的缩放似乎都是重写......任何建议都可以吗?

public boolean onTouchEvent(MotionEvent touchevent){

int actionId = touchevent.getPointerCount();

if (actionId == 1 && touchevent.getPointerCount() == 2) {
    switch (touchevent.getAction()) {
    case MotionEvent.ACTION_DOWN:
    // when user first touches the screen to swap
    {
        flag = 0;
        System.out.println("ACTION_DOWN - "
                + touchevent.getPointerCount());
        lastX = touchevent.getX();
        break;
    }

    // Finger went up
    case MotionEvent.ACTION_UP: {
        flag = 0;
        float currentX = touchevent.getX();
        System.out.println("ACTION_UP - "
                + touchevent.getPointerCount());
        // if left to right swipe on screen - previous page
        if …
Run Code Online (Sandbox Code Playgroud)

android gesture imageview pdfrenderer

5
推荐指数
0
解决办法
1501
查看次数

标签 统计

android ×1

gesture ×1

imageview ×1

pdfrenderer ×1