Android Programming The Big Nerd Ranch Guide by Bill Phillips, Chris Stewart, Kristin Marsicano (z-lib.org)

(gtxtreme123) #1

Chapter 19  Accessibility


mSomeView.postDelayed(new Runnable() {
@Override
public void run() {
// Code for making announcement goes here
}
}, SOME_DURATION_IN_MILLIS);


You could avoid using a Runnable by instead using some other mechanism for knowing when to
announce the change. For example, you might consider making the announcement in onResume()
instead – though you would then need to keep track of whether the user has just returned from the
camera app.

Free download pdf