【问题标题】:TalkBack accessibility StaggeredGridLayoutManager wrong focus orderTalkBack 可访问性 StaggeredGridLayoutManager 焦点顺序错误
【发布时间】:2019-06-22 16:57:06
【问题描述】:

所以我正在尝试使用 TalkBack 功能让我的应用程序可以访问。 我正在尝试使用布局管理器 StaggeredGridLayoutManager (Staggered GridView) 遍历 RecyclerView 中的 22 个项目,我希望焦点按照项目位置的顺序排列。

预期示例 -

 | 1 | 2 |
 | 3 | 4 |
 | 5 | 6 |
 | 7 | 8 |

...

但实际顺序是

1,2,3,4,6,7,8,9,11,10,12,19,20,21,22 https://github.com/YoniBagi/StaggeredGridForAccessibility/blob/master/accessibility.gif

现在这里有两个问题:

  1. 不按仓位顺序走。
  2. 出于某种原因,在第 12 项时,它会跳转到第 19 项并跳过介于两者之间的那些。

任何解决方案或想法将不胜感激。

代码: https://github.com/YoniBagi/StaggeredGridForAccessibility/tree/master

【问题讨论】:

  • 您提供的代码不足以确定问题所在。请在您尝试使用 TalkBack 的位置显示代码

标签: android android-layout accessibility talkback staggeredgridlayoutmanager


【解决方案1】:

我找到了解决办法,在Medium上写了一篇文章

link to solution

祝你好运!

【讨论】:

  • 欢迎来到 SO。请务必阅读此页面stackoverflow.com/help/how-to-answer,了解什么是好的答案。 “鼓励链接到外部资源,但请在链接周围添加上下文,以便您的其他用户了解它是什么以及它为什么存在。”
猜你喜欢
  • 1970-01-01
  • 2018-04-29
  • 2015-10-19
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-12-06
  • 1970-01-01
相关资源
最近更新 更多