Android.Views.View.OnPopulateAccessibilityEvent Method
Called from View.DispatchPopulateAccessibilityEvent(Android.Views.Accessibility.AccessibilityEvent) giving a chance to this View to populate the accessibility event with its text content.

Syntax

[Android.Runtime.Register("onPopulateAccessibilityEvent", "(Landroid/view/accessibility/AccessibilityEvent;)V", "GetOnPopulateAccessibilityEvent_Landroid_view_accessibility_AccessibilityEvent_Handler")]
public virtual void OnPopulateAccessibilityEvent (Android.Views.Accessibility.AccessibilityEvent e)

See Also

View.SendAccessibilityEvent(Android.Views.Accessibility.EventTypes)
View.DispatchPopulateAccessibilityEvent(Android.Views.Accessibility.AccessibilityEvent)

Parameters

e
The accessibility event which to populate.

Remarks

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.

[Android Documentation]

Requirements

Namespace: Android.Views
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 14