Pergunta

How do you get a newly started Activity to announce itself in Android TalkBack?

All the documentation I can find only refers to Views, not Activities, and those Views only announce themselves when touched. What I need is, on a change of Activity, some spoken text to tell the user where they are in the app hierarchy. Right now, on every Activity change, TalkBack just states the app name every time, which isn't useful.

I've tried adding contentDescription to the root Layout element in the Activities layout XML, but that didn't seem to make any difference. Example:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:contentDescription="My new Activity"
>

Thanks in advance...

Foi útil?

Solução

Use the android:label attribute on the Activity tag in your AndroidManifest.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top