0

我正在为 GoogleTV 开发一个应用程序,其中没有触摸屏,用户使用 D-Pad 进行导航。在应用程序中,我有一个图像的 GridView,用户可以在其中按下上下左右键来更改所选图像。Here I want the selection frame to move smoothly, for example when IMG1 is selected, and user presses left, instead of selected frame jumps to left, I want it to move smoothly with animation to left.

现在我已经能够通过使用动画选择器来做到这一点,作为 GridView 的选择器。But the animation for the selector does not work when the selection moves to a new item out of the screen. 例如,如果 GridView 的当前选择在最后一个可见行上,并且用户按下以转到当前屏幕外的下一行,则下一行从屏幕底部出现并且选择在新项目上进行,但没有任何动画和选择再次跳转到新项目!

有什么解决办法吗?有人见过这个问题吗?这也发生在 GoogleTV App Launcher GridView 中。选择在带有动画的可见应用程序图标之间移动,但如果应用程序图标不在屏幕上,它会跳转并跳过动画。

谢谢

4

1 回答 1

0

这是对象实例化工作方式的问题。为了获得流畅的动画,您需要继承 GridView 并可能添加您自己的对象管理(覆盖一些关于如何添加新行和项目的底层逻辑)。

于 2013-07-23T22:47:24.297 回答