List of usage examples for android.view.accessibility AccessibilityEvent setAddedCount
public void setAddedCount(int addedCount)
From source file:com.android.calendar.event.EditEventView.java
private void sendAccessibilityEvent() { AccessibilityManager am = (AccessibilityManager) mActivity.getSystemService(Service.ACCESSIBILITY_SERVICE); if (!am.isEnabled() || mModel == null) { return;//from www. j a va2s . c o m } StringBuilder b = new StringBuilder(); addFieldsRecursive(b, mView); CharSequence msg = b.toString(); AccessibilityEvent event = AccessibilityEvent.obtain(AccessibilityEvent.TYPE_VIEW_FOCUSED); event.setClassName(getClass().getName()); event.setPackageName(mActivity.getPackageName()); event.getText().add(msg); event.setAddedCount(msg.length()); am.sendAccessibilityEvent(event); }