android:contentDescription 的用途
来源:互联网 发布:半知不解什么意思 编辑:程序博客网 时间:2024/05/23 19:19
在Android控件中有一个属性叫做android:contentDescription 。
一般来说,用户很少使用这个属性。
但是对于一些视力有障碍的用户,android提供给用户一个很有用的功能,可以帮助使用app。
这个属性必须在用户的Accessible 中的相应属性开启后才能使用。
- 首先下载google的应用 TalkBack (an accessibility service published by Google) 并且将功能打开 Settings > Accessibility > TalkBack 设置为On。
2.在应用中添加这个属性。
<ImageView android:layout_width="82.0dip" android:layout_height="82.0dip" android:layout_centerInParent="true" android:contentDescription="@null" android:src="@drawable/me_head_bg" />
(表示android:contentDescription属性说指向的内容为空)
<Button android:id=”@+id/pause_button” android:src=”@drawable/pause” android:contentDescription=”@string/pause”/>
(android:contentDescription属性说指向的内容不为空)
3.由于这个控件没有text属性,对于一些用户来说,无法理解这个控件是做什么的。
这时用户点击这个控件。android系统会自动使用人声朗读控件上android:contentDescription属性说指向的内容。
这样用户就可以知道这个控件是做什么用的。
这个属性的主要功能就是为视力有障碍的人增加对控件的解释。
0 0
- android:contentDescription 的用途
- android:contentDescription 的用途
- android:contentDescription 的用途
- android:contentDescription 的用途
- android:contentDescription 的用途
- android:contentDescription 的用途
- android:contentDescription 的用途
- android:contentDescription 的用途
- android:contentDescription 的用途
- android:contentDescription 的用途
- android contentDescription的用法
- android contentDescription的使用
- android:contentDescription的作用是什么
- android:contentDescription的作用是什么
- android:contentDescription
- android:contentDescription
- android:contentDescription
- android:contentDescription的作用及使用方法
- 用git把代码托管到CSDN
- UIScreen,UIWindow,UIView
- android 自定义 PDF view
- linux文件权限
- 深入C#中get与set的详解
- android:contentDescription 的用途
- Redis实现可靠低延时的消息队列
- spring mvc 方法注解拦截器
- 随机提取fq文件中的reads perl程序处理
- 表空间22
- Android判断包名和类名是否存在的方法
- Prefix.pch文件的添加方式
- oracle中length、lengthb、substr、substrb用法小结
- 求二叉树的深度