"类型库是德precated",请告诉我最好的选择吗? [英] "The type Gallery is deprecated", Whats the best alternative?

查看:387
本文介绍了"类型库是德precated",请告诉我最好的选择吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的很惊讶,这样一个小工具去获得precated。
我想要一个简单的画廊是滚动左右,显示了整个活动屏幕上的图片,最重要的是,你不能在任何方向轻扫超过1的图像,即使滚动速度快则切换到下一张图片。

I was really surprised that such a Widget gets deprecated.
I want a simple gallery that scrolls left and right, shows a picture on the whole Activity screen, and most important is that you cant swipe more than 1 image in any direction, even if the scroll speed is fast it changes to the next image.

因此​​,这小工具,我应该使用?或者我应该用一个简单的ImageView和处理所有的重击,并添加一个动画?

So which Widget should I use? Or should I use a simple ImageView and handle all the swipes and add an animation?

推荐答案

据指出,在文档:

该插件不再支持。其他水平滚动部件包括Horizo​​ntalScrollView和ViewPager从支持库。

This widget is no longer supported. Other horizontally scrolling widgets include HorizontalScrollView and ViewPager from the support library.

Horizo​​ntalScrollView将接近你在找什么,我认为。

HorizontalScrollView will be closer to what you are looking for I think.

我怀疑画廊是德precated,因为它没有正确使用convertView其适配器。这意味着它必须创造这是对性能的消耗每一项新的看法。

I suspect that Gallery was deprecated because it did not properly use convertView with its adapter. Which meant that it had to create a new view for every item which was a drain on performance.

你有另一种选择是使用href="https://github.com/falnatsheh/EcoGallery" rel="nofollow">第三方创建EcoGallery 的不幸的是引擎收录链接是唯一的参考吧,我现在可以在网上找到。

Another option you have is to use the 3rd party created EcoGallery which Joseph Earl created to overcome the issue, this version does recycle its views properly. Unfortunately that pastebin link is the only reference to it I can find online now.

这篇关于"类型库是德precated",请告诉我最好的选择吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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