美文网首页工作生活
无障碍 辅助功能,入门

无障碍 辅助功能,入门

作者: yunhen | 来源:发表于2019-07-01 14:21 被阅读0次

这个文章讲的比较细致https://blog.csdn.net/weimingjue/article/details/82744146

android:canRetrieveWindowContent 是 false时,
android:accessibilityFlags中 ,flagRetrieveInteractiveWindows 无效,
flagRetrieveInteractiveWindows:有效时,getWindow()才不是null

android:accessibilityFlags 设置 flagReportViewIdsgetViewIdResourceName才不是null

android:accessibilityFlags 设置flagIncludeNotImportantViews,表示:此标志向系统指示辅助功能服务要访问所有交互式窗口的内容。交互式窗口是一个具有输入焦点的窗口,或者当触摸浏览未启用时,有视力的用户可以触摸该窗口。如果未设置此标志,您的服务将不会接收accessibilityEvent.type_windows_changed events,调用accessibilityServiceAccessibilityService_getWindows()将返回空列表,accessibilityNodeInfo_getWindow()将返回空列表。
要设置此标志的服务必须通过将属性canRetrieveWindowContent设置为true来声明在其元数据中检索窗口内容的功能,否则将忽略此标志。

相关文章

网友评论

    本文标题:无障碍 辅助功能,入门

    本文链接:https://www.haomeiwen.com/subject/eeugcctx.html