我正在创建一个实时内容淹没,为了避免混淆用户,我想暂停并继续更新它的用户界面,而用户正在与语音菜单交互。问题是在活动显示时调用onPanelOpen(),在活动结束时调用onPanelClosed()。
以下是问题:
发布于 2014-07-15 15:20:11
我遇到了一个类似的问题,据我所知,在检测到“ok,glass”时不需要回调。我遵循了类似于在这个问题上描述的步骤:Glass voice command nearest match from given list -拉出所提到的APK (注意,它从/system/priv/移动到/system/priv/),然后设置自己的侦听器。这肯定不是一个理想的情况;如果您使用手势来拉动菜单而不是语音命令,就会触发各种有用的回调(onPreparePanel、onCreateOptionsMenu等)。如果你已经想出了更好的解决方案,请分享你的发现,因为你发布了这个问题!
(至于第二部分(检测到向下滑动的手势),很抱歉我还没有尝试检测到)
发布于 2014-07-29 13:36:26
同样,XE 19.1中还没有回调。
我的解决方案:
To update the menu when I need (recreate the menu) :
getWindow().invalidatePanelMenu(WindowUtils.FEATURE_VOICE_COMMANDS);
To catch exit of the the menu :
Add "Cancel" in the menu, and do stuff in the onMenuItemSelected function if
Cancel is calledhttps://stackoverflow.com/questions/24333061
复制相似问题