如何适应图像中ImageViewTouch全屏 [英] How to fit image in full screen in ImageViewTouch

查看:1702
本文介绍了如何适应图像中ImageViewTouch全屏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 [ImageViewTouch] [1] 库来缩放图片代替ImageView的。

I am using [ImageViewTouch][1] library to zoom a image instead of imageview.

<it.sephiroth.android.library.imagezoom.ImageViewTouch
           android:id="@+id/imageweb"
           android:layout_width="fill_parent"
           android:layout_height="fill_parent"
            android:adjustViewBounds="true"
           android:background="@drawable/bg_loading"
           android:scaleType="fitCenter" />

我要上加载ImageViewTouch控制图像和图像的宽度会自动适合我的屏幕。
如何只适合宽度和高度都到我的手机屏幕?

I want to load the image on ImageViewTouch control and the width of image will auto fits my screen. How to fit only width and height both to my mobile screen?

下面,当我做3次双击在第1次是指第二次也不过3倍,其适合于高度与设备屏幕的宽度得到了完美的放大为什么它不适合在第一次的时间。

Here when i do 3 times double tap means in 1st time its get zoomed in 2nd time also but in 3rd times its fits to height and width of the the device screen perfectly why its not fit at the time of first time.

但它没有加载适合的高度和宽度在第一次?请帮我理清这个问题。

But its not loaded fit to height and width at first time.? Please help me to sort out this issue.

我用这个库中的类可能是我要在这里改变一些东西。

I used this library classes May be i have to change here some thing.

1) [first][2]
2) [second][3] 

请检查截图:

当第一次它自动加载:

When first time its loaded automatically :

在双击这里先手段和第二次变焦和第三次的完全符合为什么它在第一次的时候没有安装时的ImageView加载此图像。

After 3 times double tap means here first and second time zoom and 3rd time its fits perfectly why its not fitted at the time of first time when imageview loaded this image.

我已经尝试回答以下问题,但它不是工作。

I already tried below answers but its not works.

感谢您的支持

推荐答案

it.sephirot.android.library.imagezoom.ImageViewTouchBase 更改行

protected DisplayType mScaleType = DisplayType.FIT_IF_BIGGER;

protected DisplayType mScaleType = DisplayType.FIT_TO_SCREEN;

这篇关于如何适应图像中ImageViewTouch全屏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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