From the course: Android App Development: Accessibility
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Custom views - Android Tutorial
From the course: Android App Development: Accessibility
Custom views
- [Instructor] In our simple application we have an example of a custom view. - [TalkBack Voice] Custom view button. Custom view. - [Instructor] This custom view is a very simple view which we just draw a text on top of it. Let's see the behavior with TalkBack enabled. - [TalkBack Voice] Custom view. Navigate custom. - [Instructor] As you can see, I cannot focus on this view. So how do I make it accessible for accessibility services such as TalkBack so I can focus and understand what it is? On Android Studio, let's go to the ui folder and open the SimpleCustomView. As you can see, this view is very simple which extends just a View and draws the text on the screen. Scroll down to the draw function and after that let's override another function called ownInitailizeAccessibilityNodeInfo so that we can provide the information to accessibility services. So hit Command + N and override and then override the ownInitailizeAccessibilityNodeInfo. Here in the info all we need to do is set the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
The POUR principle1m 6s
-
(Locked)
Focus navigation3m 25s
-
(Locked)
Update default focus navigation3m 9s
-
(Locked)
Labels, roles, values, and states2m 43s
-
Apply visual attributes to tab layout4m 14s
-
(Locked)
Provide unique and meaningful labels6m 37s
-
(Locked)
Labels for input controls4m 42s
-
(Locked)
Create unique labels7m 45s
-
(Locked)
Handle RecyclerView updates3m 41s
-
(Locked)
Handle Single Activity layouts6m 39s
-
(Locked)
Accessibility events5m 10s
-
(Locked)
Accessibility live region2m 12s
-
(Locked)
Accessibility node info2m 14s
-
(Locked)
Custom views1m 48s
-
(Locked)
-
-
-