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()?
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.