android-times-square
android-times-square copied to clipboard
Individual dates not selectable via keyboard
I cannot select a date using the keyboard. We have a requirement to support accessibility and when the calendar view opens, the tab key only allows selection of the entire month. There doesn't seem to be a way, via keyboard tab key or arrow keys, to navigate between days and select a date.
Any ideas on how to make dates keyboard selectable?
@martygeek I'd be open to a PR but I don't have any ideas on how to go about it. Probably best to start here: https://developer.android.com/training/keyboard-input/navigation.html
It should be fairly simple stuff to add. Accessibility for keyboard nav means the user should be able to direct focus to the elements on the screen using the tab or arrow keys. In xml, you can set 'android:focusable="true"' to a view and then the tab key on the keyboard will focus on that view.
Sounds good, go for it.
since the calendar is a listview, adding that in XML might be a problem You might need 'listView.setFocusableInTouchMode(true);' or 'listView. setItemsCanFocus(true)'. You might also have to explicitly set focus on the view in the listview with android:descendantFocusability="afterDescendants" and then listview.AddFocusables(ArrayList<View>, int direction, int focusableMode)