Android Acessibility API contentDescription

val*_*lll 0 android accessibility

嗨,我一直在努力学习如何添加一些辅助功能工具,但它似乎既不适用于三星galaxy s2也不适用于模拟器.我创建了一个简单的活动,这是一个布局:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent"
   android:orientation="vertical" >

   <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/hello"
        android:contentDescription="Title" 
        android:focusable="true"/>

    <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Button" 
        android:contentDescription="Button to click"
        android:focusable="true"/>

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/ic_launcher"
        android:contentDescription="Small image"
        android:focusable="true"/>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

我的应用程序设置为最低级别1.6和目标4.0我已添加了android suppport库.不幸的是,当我尝试"触摸"或选择这些项目时,我听不到描述.当然我已经激活了可访问性和TalkBack应用程序,但我这里唯一的事情是"屏幕关闭,音量x%"....还有什么我必须要做的吗?谢谢

ala*_*anv 6

Honeycomb及以下的辅助功能需要使用轨迹球或方向键,或者提供虚拟D-Pad的无眼键盘,可在Play商店使用.语音反馈还需要一个有效的文本到语音引擎,因此请确保您的设备已安装语音数据.

你可以在这里找到Eyes-Free键盘:https: //play.google.com/store/apps/details?id = com.googlecode.eyesfree.inputmethod.latin

当TalkBack打开并且TTS正常工作时,按下D-Pad箭头将在项目之间移动焦点,这些项目将大声读取它们(或任何内容描述).

冰淇淋三明治及其上方有一个"触摸式探索"功能,允许用户只需触摸屏幕即可听到反馈,而且不需要方向控制器.

作为旁注:已经有文本的视图(如TextView和Buttons)通常不需要内容描述.纯粹装饰的图像应该具有空的内容描述,可以使用android:contentDescription ="@ null"进行设置.