我已打开可访问性,并且我的设备在我四处导航时会说话。
我有一个习惯seekbar
并实现了以下内容:
onTouchEvent
摘抄:
...
case MotionEvent.ACTION_MOVE:
getParent().requestDisallowInterceptTouchEvent(true);
setTouchAngle(pointToAngle(touchX, touchY));
score = getScoreFromAngle(angleStart,touchAngle);
if (onScoreSetListener != null) {
onScoreSetListener.onScorePoll(this, score);
sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_TEXT_CHANGED);
}
break;
...
onPopulateAccessibilityEvent
方法:
@Override
public void onPopulateAccessibilityEvent(AccessibilityEvent event) {
super.onPopulateAccessibilityEvent(event);
LogUtils.i(TAG,"onPopulateAccessibilityEvent()",null);
switch (event.getEventType()) {
case AccessibilityEvent.TYPE_VIEW_TEXT_CHANGED:
LogUtils.d(TAG,"dispatchPopulateAccessibilityEvent() TYPE_VIEW_TEXT_CHANGED",null);
event.getText().add(String.valueOf(getScore()));
break;
}
}
我可以看到onPopulateAccessibilityEvent
被LogCat
成功调用,但设备没有给出任何反馈。我希望能读回当前的分数,但什么也没有。
有没有人有任何见解?