繁体   English   中英

Google Glass-在CardScrollView中“跳转”到卡片吗?

[英]Google Glass - 'Jump' to a card in CardScrollView?

我有一个使用CardScrollView来显示一系列卡片的Google Glass应用。

触摸手势可以在卡之间移动,但是我需要能够通过它们的索引跳到特定的卡。 我想使用上下文语音命令(暂时忽略其局限性)来执行此操作,例如:“好吧,转到卡25”。

我希望能够做这样的事情...

CardScrollView mCardScrollView = new CardScrollView(this);
    // ...
    // "ok glass, go to card 25"
    // ...
mCardScrollView.setFocus(25);

...但是我似乎找不到找到该功能的函数。

我在Google的参考页面上找不到任何内容: https : //developers.google.com/glass/develop/gdk/reference/com/google/android/glass/widget/CardScrollView

他们的示例代码也没有涵盖以下内容:
https://developers.google.com/glass/develop/gdk/ui-widgets#scrolling_cards_in_activities

我想尽可能使用CardScrollView ,因为与ViewFlipperViewPager相比,我喜欢它的动画和滚动方式。 我认为应该有这么简单的功能。 也许我缺少什么?

我只是有一个类似的问题。 我能够使用mCardScrollView.setSelection(cardPosition),它适用于m

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM