简体   繁体   English

使用Titanium的Android上的大图像

[英]Large images on Android with Titanium

I need to display a huge image (at least 2000x2000) on Android with Titanium and let the user scroll around, just like they were using a scroll view on iOS. 我需要在Android上使用Titanium显示一个巨大的图像(至少2000x2000)并让用户滚动,就像他们在iOS上使用滚动视图一样。 However, I know Android doesn't support the same kind of scroll view, so I opted to use an ImageView. 但是,我知道Android不支持相同类型的滚动视图,所以我选择使用ImageView。

I'm unable to display this image properly or at least the way I'd like (without it being blurry when you zoom in) because of memory issues. 由于内存问题,我无法正确显示此图像或至少以我喜欢的方式显示此图像(放大时不会模糊)。 Has anyone found a way to make large scrollable images work in Titanium on Android without potential memory crashes? 有没有人找到一种方法可以在Android上的Titanium中使大型可滚动图像工作而不会发生潜在的内存崩溃?

I tried WebView also, but it seemed to resize my image and when you zoomed it was blurry as well. 我也尝试过WebView,但它似乎调整了我的图像大小,当你放大它时它也很模糊。 I was hoping Android webview supported SVG, but it looks like they don't on a majority of devices. 我希望Android webview支持SVG,但看起来它们并不适用于大多数设备。

This is by far the best answer I've found: 到目前为止,这是我发现的最佳答案:

http://www.tenxperts.com/2011/07/13/working-with-large-images-in-android/ http://www.tenxperts.com/2011/07/13/working-with-large-images-in-android/

I tried it and it works well with Titanium web views. 我尝试了它,它适用于Titanium Web视图。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM