3

The most common way to to create a "Header" in a RecyclerView is by implementing ItemDecoration.

The header usually involves some text of course. We create a "Header View" layout, inflate it and then draw to the canvas. A bit like in an example here.

But the problem with this very common approach is that the header text is then not part of the view tree and therefore is not accessible (Cannot be read out by TalkBack etc)

How have people got around this? Can someone point me to an example of an ItemDecoration being implemented that is compatible with accessibility?

Eurig Jones
  • 8,226
  • 7
  • 52
  • 74

1 Answers1

0

Have you tried something like what is done here https://medium.com/androiddevelopers/get-ahead-using-headers-in-recyclerview-2909a69b19?

Jkkarr
  • 382
  • 4
  • 18