本文整理了Java中android.widget.TextView.setAccessibilityDelegate()
方法的一些代码示例,展示了TextView.setAccessibilityDelegate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextView.setAccessibilityDelegate()
方法的具体详情如下:
包路径:android.widget.TextView
类名称:TextView
方法名:setAccessibilityDelegate
暂无
代码示例来源:origin: stackoverflow.com
Toast toast = new Toast(this);
TextView messageView = new TextView(this);
messageView.setText("visible text");
View.AccessibilityDelegate delegate = new View.AccessibilityDelegate() {
@Override
public void onPopulateAccessibilityEvent(View host, AccessibilityEvent event) {
super.onPopulateAccessibilityEvent(host, event);
event.setContentDescription("audible text");
}
};
messageView.setAccessibilityDelegate(delegate);
toast.setView(messageView);
toast.show();
代码示例来源:origin: derry/delion
description.setAccessibilityDelegate(new AccessibilityDelegate() {
@Override
public void onInitializeAccessibilityEvent(View host, AccessibilityEvent event) {
内容来源于网络,如有侵权,请联系作者删除!