Code example for AccessibilityEvent

Methods: getEventTypesetContentDescription

0
	} 
	 
	@Override 
	public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
		if (reading == null) {
			event.setContentDescription("Distress meter, unset");
		} else { 
			event.setContentDescription("Distress meter at level "+reading);
		} 
		if (event.getEventType() == AccessibilityEvent.TYPE_VIEW_SELECTED) {
			TtsContentProvider.stopSpeech(null); 
			if (selected) {
				event.setContentDescription("Distress meter selected");
			} else { 
				event.setContentDescription("Distress meter unselected");
			} 
		} else if (event.getEventType() == AccessibilityEvent.TYPE_VIEW_TEXT_CHANGED) {
			event.setContentDescription("Distress level "+reading);
		} 
		return true; 
	} 
	 
	public Integer getScore() {
Contextual code suggestions in your IDE  Get Codota for Java