afohrman 93e63fa38a Distinguish selected navigation items from unselected navigation items.
Override onInitializeAccessibilityNodeInfo to set the selected state based on whether or not the item is checked. It would be more intuitive to set the AcccessibilityNodeInfo to be checked, since the menu API used for bottom navigation uses checking as opposed to selection, but setChecked does not produce the desire behavior in talkback.

Before this change: Activated item is read out with no indication of its selected state.(ex: "Page 2")
After this change: Activated item is read out with "selected" before its label (ex: "selected, Page 2")

This new behavior is the same behavior seen in tabs.

PiperOrigin-RevId: 192696908
2018-04-17 15:53:51 -04:00
..