相关疑难解决方法(0)

如何从夹点中心缩放列表项

我正在开发一款适用于Android的简单书籍阅读器应用程序.我已经使用了listview.

我正在做的是将远程图像从服务器加载到我的Listview(使用毕加索库),并且工作正常.

我还想在我的Reader中缩放功能,我使用ZoomListView类来实现这一点.

public class ZoomListView extends ListView {
private static final int INVALID_POINTER_ID = -1;
private int mActivePointerId = INVALID_POINTER_ID;
private ScaleGestureDetector mScaleDetector;

private float mScaleFactor = 1.f;
private float maxWidth = 0.0f;
private float maxHeight = 0.0f;
private float mLastTouchX;
private float mLastTouchY;
private float mPosX;
private float mPosY;
private float width;
private float height;

public ZoomListView(Context context) {
    super(context);
    mScaleDetector = new ScaleGestureDetector(getContext(),
            new ScaleListener());
}

public ZoomListView(Context context, AttributeSet attrs) {
    super(context, attrs);
    mScaleDetector = new …
Run Code Online (Sandbox Code Playgroud)

android listview android-gesture pinchzoom

11
推荐指数
1
解决办法
1221
查看次数

标签 统计

android ×1

android-gesture ×1

listview ×1

pinchzoom ×1