在 Android 2 (API 5) 中模拟堆栈视图? [英] Simulate stack view in Android 2 (API 5)?

查看:22
本文介绍了在 Android 2 (API 5) 中模拟堆栈视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序必须有一个可以显示卡片的小部件,并且用户可以翻转卡片.StackWidget 示例(在 Android 的资源中)有一个很好的小部件:

My App must have a widget that can show cards and user can turn over cards. StackWidget sample (in Android's resources) has a good widget:

但是小部件布局中有一个 StackView,它从 API 级别 11 开始可用,我必须为 API 级别 5 实现我的应用程序.

But there is a StackView in layout of widget and it is available since API Level 11 and I have to implement my App for API level 5.

我还看到了这个 API 级别 7 及更高级别的小部件,我猜它使用 OpenGL ES:

Also I saw this widget that works API level 7 and upper, and I guess uses OpenGL ES:

最后我们如何在 Android 2 (API 5) 中模拟堆栈视图?或者我们如何实现像第二张图片(上图)这样的小部件?

Finally how we can simulate stack view in Android 2 (API 5)? Or how we can implement a widget like second image (above)?

推荐答案

出于安全考虑,绝对不可能在小部件中使用自定义视图.您只能使用标有@RemoteView 注解的系统.

It is absolutely impossible to use custom views in widgets because of security. You can only use system ones marked with a @RemoteView annotation.

OEM 过去在固件中放入的那些精美的动画可滚动 3D 小部件只能与他们的自定义启动器一起使用,因为他们知道这些自定义视图并允许它们膨胀.或者,这些小部件也可以是所述自定义启动器的一部分.

Those fancy animated scrollable 3D widgets OEMs used to put in their firmwares only work with their custom launchers because they are aware of those custom views and allow them to be inflated. Alternatively, these widgets can as well be a part of said custom launchers.

这篇关于在 Android 2 (API 5) 中模拟堆栈视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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