Android辅助对讲说的片段的标题 [英] Android accessibility talkback to say fragment's title

查看:119
本文介绍了Android辅助对讲说的片段的标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法让Android辅助对讲功能说的片段交易后的东西吗?我基本上要对讲切换后说片段的名称/称号。这些标题设置为操作栏的冠军,他们能访问吗?用户可以将他们的手指上的文字顶部的操作栏中知道他们是什么屏幕,但用户不会知道,除非他们熟悉的应用程序了。

Is there a way to get the talkback function in Android accessibility to say something after a fragment transaction? I basically want the talkback to say the name/title of the fragment after switching. These titles are set as the titles of the action bar, can they be accessed there? A user can move their finger on top of the text in the action bar to know what screen they are on, but the user won't know that unless they were familiar with the app already.

推荐答案

您可以强制WINDOW_STATE_CHANGED事件从装修风格来看,宣布动作条的标题。这也将导致话语提示清除辅助对焦,所以你应该只把它当应用程序的主要内容的修改。

You can force a WINDOW_STATE_CHANGED event from the decor view to announce the ActionBar title. This will also cause TalkBack to clear accessibility focus, so you should only call it when the app's primary content changes.

getWindow().getDecorView()
        .sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);

这篇关于Android辅助对讲说的片段的标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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