Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the purpose of setContentDescription() of a view?

I was in a dialemma on how to associate a string information to a view. I came across two methods

setTag()

and

setContentDescription()

Both served my purpose.

I know that setTag() is used in this cases generally. But when is setContentDescription() method used? , what is exact purpose of setContentDescription()?

like image 878
Yashwanth Kumar Avatar asked Sep 11 '11 18:09

Yashwanth Kumar


2 Answers

Screen readers are used by those with impaired vision. “Accessibility” is a standard term for facilitating access by users with some kind of disability.

like image 177
Lawrence D'Oliveiro Avatar answered Oct 23 '22 16:10

Lawrence D'Oliveiro


But when is setContentDescription() method used?

From the docs, setContentDescription() allows you to associate a textual description to the view. The docs state that it's primarily used to support accessibility, so I assume it's there to support screen readers.

like image 26
Erich Douglass Avatar answered Oct 23 '22 15:10

Erich Douglass