在ImageView的全尺寸图片 [英] Full size image in ImageView

查看:108
本文介绍了在ImageView的全尺寸图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想绘制图像在ImageView的,但我希望它是缩放的,带有滚动条是必要的。我怎样才能做到这一点?现在,我只是有一组绘制的机器人:在XML中的ImageView的SRC。这autoscales图像以适应屏幕宽度。

I'm trying to draw an image in an ImageView, but i want it to be unscaled, with scrollbars as necessary. How can I accomplish this? Right now I just have a drawable set as the android:src of the ImageView in the XML. This autoscales the image to fit the screen width.

我看,这可能是因为兼容模式(开发1.5,测试在2.1),但后来我加了

I read that this might be because of the compatibility mode (developing for 1.5, testing on 2.1), but then I added

<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4" />

我的表现,并没有什么改变。

to my manifest, and nothing changed.

任何线索?

-

编辑:我用安卓scaleType =中心在ImageView的,这显示了完整的图像(不能相信我之前没看到这一点) ,但我仍然只得到一个垂直滚动条。使用安卓滚动条=横向上的滚动型多数民众赞成缠ImageView的(显然)隐藏垂直滚动条,但不显示水平滚动条...

I used android:scaleType="center" on the ImageView, and this displays the full image (can't believe I didn't see this before), but I still only get a vertical scrollbar. Using android:scrollbars="horizontal" on the ScrollView that's wrapped around the ImageView (obviously) hides the vertical scrollbar, but doesn't show a horizontal scrollbar...

推荐答案

检查这例如它有助于

这篇关于在ImageView的全尺寸图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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