About
Custom view
Articles Related
Layout file
<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
- Canvas and Drawables guide
- Custom Drawing guide.
- Input Events in Custom Views: Motion Event Docs