Google Glass:执行“点击”事件或类似的事情 [英] Google Glass: Performing "Click" event or something similar

查看:183
本文介绍了Google Glass:执行“点击”事件或类似的事情的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请看下面的代码

<article style="left: 640px; visibility: visible;">
 <section>
   <table>
    <tbody><tr><td><center>154 de 500</center></td></tr>
    <tr><td>First Page</td></tr>
   </tbody></table>
 </section>
</article>

此生成以下UI

< img src =https://i.stack.imgur.com/7ny5n.pngalt =enter image description here>

当我选择First页面文本,我需要将该文本更改为您点击了此。我该怎么做?是否有任何事件处理程序的点击或任何其他方式这样做?我很抱歉,如果这是一个简单的问题,这是我第一次写出一些真正适用于 PlayGround 的东西。

When I select the "First Page" text, I need that text to change into "You Clicked This". How can I do this? Is there any event handler for click or any other way to do this? I am sorry if this is a simple question, this is the first time I managed to write something that really worked on PlayGround.

我知道这不像电脑,所以你可以自由地向我推荐我如何选择文字。可以使用语音命令,也许是点击或任何,但用户需要以某种方式选择它,以便文本将更改。

I know it is not like PC so you are 100% free to suggest me how to select the text. May with Voice commands, maybe with clicks or whatever, but user need to select it somehow so that text will change.

推荐答案

用户不能点击时间表卡的内容。您必须添加菜单项,当用户在看卡时点击会显示。当用户选择菜单项时,Google会通知您的服务器(请参阅文档中的订阅),然后您的服务器可以将PUT请求发回Google替换原始项目。

Users can't click on the contents of timeline cards. You have to add menu items which will appear when the user taps while looking at your card. When the user selects a menu item, Google will then notify your server (see 'subscriptions' in the docs) and your server can then send a PUT request back to Google to replace the original item.

玻璃开发网站有一大堆菜单和订阅信息。操作工具对这些东西的使用有限,但您需要使用真正的Glass硬件。您还需要在Google可以达到的服务器上运行您的订阅回调。因此,除非您使用某种代理设置(我使用runscope),否则您的开发人员电脑上不会安装本地主机。

The glass dev site has a bunch of info on menus and subscriptions. The playground tool is of limited use with these things though so you'll need to work with real Glass hardware. You also need to have your subscription callback running on a server that the Google can reach.. So, not localhost on your dev PC unless you have some kind of proxy setup (I use runscope for that)

这篇关于Google Glass:执行“点击”事件或类似的事情的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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