替换已弃用图库的选项

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

这篇关于替换已弃用图库的选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

How to target newer versions in .gitlab-ci.yml using auto devops (java 11 instead of 8 and Android 31 instead of 29)(如何在.gitlab-ci.yml中使用自动开发工具(Java 11而不是8,Android 31而不是29)瞄准较新的版本)
Android + coreLibraryDesugaring: which Java 11 APIs can I expect to work?(Android+core LibraryDesugering:我可以期待哪些Java 11API能够工作?)
How to render something in an if statement React Native(如何在If语句中呈现某些内容Reaction Native)
How can I sync two flatList scroll position in react native(如何在本机Reaction中同步两个平面列表滚动位置)
Using Firebase Firestore in offline only mode(在仅脱机模式下使用Firebase FiRestore)
Crash on Google Play Pre-Launch Report: java.lang.NoSuchMethodError(Google Play发布前崩溃报告:java.lang.NoSuchMethodError)
4