Android - Custom View

Card Puncher Data Processing

About

Custom view

Layout file

Android - Layout File (XML)

<com.myapp.myView
     android:height="..."
     android:width="..."
/>

Accessibility

To get access to the AccessibilityManager instance, use this code:

// Send an event to the accessibility Manager
AccessibilityManager accessibilityManager =  (AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE);
if (accessibilityManager.isEnabled()) {
    sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_TEXT_CHANGED);
}

// Handle the event in the custom view ?
@Override
public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent ev) {
  ev.getText.add("What you want?");
}

Documentation / Reference







Share this page:
Follow us:
Task Runner