图片廊教程德precated [英] Image Gallery tutorial is deprecated

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

问题描述

我在本教程挣扎:
http://developer.android.com/resources/tutorials/views/hello -gallery.html

它不会对API大于1.6的工作,我不能使它发挥作用。
在R.styleable是pcated德$ P $

it wont work on API greater then 1.6, and i can't make it work. the "R.styleable" is deprecated

我将不胜感激,如果有人能提供一个图片库工作教程。

i would be grateful if anyone can provide a working tutorial for an image gallery.

谢谢!

推荐答案

不仅教程德precated,整个部件是因为果冻豆pcated德$ P $。

Not only the tutorial is deprecated, the whole widget is deprecated since Jelly Bean.

谷歌的建议:使用ViewPager或Horizo​​ntalScrollView来代替,而不要使用它像其他的ListView滚动意见。结论:帮助自己...:/

Google's suggestion: use ViewPager or HorizontalScrollView instead and don't use it other scroll views like ListView. Conclusion: Help yourself... :/

雪这是你的任务落实画廊的中心锁定刷卡行为和使用BaseAdapter至preLOAD并显示相邻的项目。像垂直滚动的意见水平画廊(经常在新闻应用中使用)一些UI模式是难以实现的。

SNow it's your task to implement the center-locked swipe behavior of the gallery and using a BaseAdapter to preload and show adjacent items. Some UI patterns like horizontal galleries in vertical scroll views (often used in news apps) are harder to implement.

与视图寻呼机的问题:它tooks父视图容器的整个高度,而忽略了它的高度的的孩子。因此很难在一个垂直滚动视图或列表视图项目布局的一个或多个视图寻呼机。

The problem with the view pager: it tooks the whole height of the parent view container and ignores the height's of it's children. So it's hard to layout one or more view pagers in a vertical scroll view or as a list view item.

这篇关于图片廊教程德precated的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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