【发布时间】:2022-06-18 16:06:42
【问题描述】:
Android TalkBack 可以做一些我也想做的事情。具体来说,它是识别用户触摸的视图。到目前为止我做到了:
@Override
public void onAccessibilityEvent(AccessibilityEvent event) {
if (event.getEventType() == AccessibilityEvent.TYPE_VIEW_CLICKED) {
//This only shows the package of the activity that the view is in, I want to identify the view itself
Toast.makeText(this, "" + event.getSource().getPackageName(), Toast.LENGTH_LONG).show();
}
}
【问题讨论】:
标签: java android accessibility accessibilityservice