Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一些视觉障碍用户根本无法使用的图像。我想在我的代码中保持一致,所以我有内容描述。是否有一个特定的字符串可以实现,所以当用户触摸图像时,Talkback 不会说任何内容。
编辑:以前的答案是不要在 XML 中添加标签。正确答案是添加值“@null”。这可以防止说出字符串(与添加属性相同),但@null 也会防止 LINT 工具因缺少属性而对您大喊大叫。