Options for replacing the deprecated Gallery(替换已弃用图库的选项)
问题描述
我目前正在使用图库小部件来显示缩略图的滑动列表.每个缩略图都有一个背景颜色和一个文本覆盖.(这是一个颜色选择器).
但是,从 API 版本 16 开始,该库已被弃用..据我了解,API 版本大于 16 的手机不保证具有图库小部件.
我会使用 viewpager,但它一次只显示一个视图,我也想显示相邻的视图.水平滚动视图可以做到这一点,但它不会像画廊那样捕捉到最近的选项.
我查找了现有的小部件,但找不到.你对我应该选择什么小部件有什么建议吗?
你试过coverflow吗?你可以使用这个.https://github.com/Polidea/android-coverflow 希望这对你有所帮助.p>
或
您还可以使用页面卷曲进行滑动.https://github.com/moritz-wundke/android-page-curl
I am currently using the Gallery widget to display a sliding list of thumbnails. Each thumbnail has a background colour and a text overlay. (It's a colour chooser).
However as of API version 16, the gallery is deprecated.. As I understand it, phones with API versions greater than 16 aren't guaranteed to have the gallery widget.
I would use a viewpager, but that only shows one view at a time, and I want to show adjacent views too. A horizontal scroll view may do it, but it won't snap to the nearest option like a gallery will.
I've looked for existing widgets, and can't find any. Do you have any suggestions as to what widget I should choose?
Have you tried coverflow? You can use this. https://github.com/Polidea/android-coverflow Hope this might help you.
or
You can also use page curl for swipping. https://github.com/moritz-wundke/android-page-curl
这篇关于替换已弃用图库的选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:替换已弃用图库的选项
基础教程推荐
- AdMob 广告未在模拟器中显示 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
