문제

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...

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top