Android的画廊与双指缩放 [英] Android Gallery with pinch zoom

查看:308
本文介绍了Android的画廊与双指缩放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现画廊,双指缩放的样本项目,并取得了一些bug修复。您可以下载我的code在这里

I found a sample project of gallery with pinch zoom and made some bug fix. You can download my code at here

它支持全屏只。它总是居中图像屏幕的高度。但我想把一个头,以便在屏幕的顶部,使调整到图像的位置。图像的位置应该是:

It supports full screen only. It always center the image to screen height. But I want to put a header view to the top of the screen and make the adjustment to the location of the image. The image location should be:

header height + (screen height - header height) / 2

我不使用矩阵那么好。任何人有如何使自定义库的任何大小的工作(不只是全屏幕)的想法?

I am not so good at using Matrix. Anyone has idea of how to make the customized gallery to work in any size (not just full screen)?

推荐答案

您可以用我的捏放大图库项目。您可以选择从画廊的任何图像,然后在 onDoubleTap(MotionEvent E)开放完整的图像,并放大。

You can use my Pinch to zoom Gallery project. You can choose any image from gallery and then in onDoubleTap(MotionEvent e) open full image and zoom it.

这篇关于Android的画廊与双指缩放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆