- e
- The accessibility event which to populate.
Called from View.DispatchPopulateAccessibilityEvent(Android.Views.Accessibility.AccessibilityEvent) giving a chance to this View to populate the accessibility event with its text content. While this method is free to modify event attributes other than text content, doing so should normally be performed in View.OnInitializeAccessibilityEvent(Android.Views.Accessibility.AccessibilityEvent).
Example: Adding formatted date string to an accessibility event in addition to the text added by the super implementation:
java Example
public void onPopulateAccessibilityEvent(AccessibilityEvent event) { super.onPopulateAccessibilityEvent(event); final int flags = DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_WEEKDAY; String selectedDateUtterance = DateUtils.formatDateTime(mContext, mCurrentDate.getTimeInMillis(), flags); event.getText().add(selectedDateUtterance); }
If an NoType:android/view/View$AccessibilityDelegate;Href=../../../reference/android/view/View.AccessibilityDelegate.html has been specified via calling View.SetAccessibilityDelegate(.AccessibilityDelegate) its NoType:android/view/View$AccessibilityDelegate;Href=../../../reference/android/view/View.AccessibilityDelegate.html#onPopulateAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent) is responsible for handling this call.
Note: Always call the super implementation before adding information to the event, in case the default implementation has basic information to add.