fiore@0: /* fiore@0: CCmI Diagram Editor for Android fiore@0: fiore@0: Copyright (C) 2012 Queen Mary University of London (http://ccmi.eecs.qmul.ac.uk/) fiore@0: fiore@0: This program is free software: you can redistribute it and/or modify fiore@0: it under the terms of the GNU General Public License as published by fiore@0: the Free Software Foundation, either version 3 of the License, or fiore@0: (at your option) any later version. fiore@0: fiore@0: This program is distributed in the hope that it will be useful, fiore@0: but WITHOUT ANY WARRANTY; without even the implied warranty of fiore@0: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the fiore@0: GNU General Public License for more details. fiore@0: fiore@0: You should have received a copy of the GNU General Public License fiore@0: along with this program. If not, see . fiore@0: */ fiore@0: package uk.ac.qmul.eecs.ccmi.accessibility; fiore@0: fiore@0: import android.content.Context; fiore@0: import android.util.AttributeSet; fiore@0: import android.view.accessibility.AccessibilityEvent; fiore@0: import android.widget.TextView; fiore@0: fiore@0: /** fiore@0: * fiore@0: * A Text view used as argument of the {@code ArrayAdapter} constructor. It prevents the fiore@0: * screen reader from talking too much when clicking on the list items. fiore@0: * fiore@0: */ fiore@0: class AccessibleTextView extends TextView { fiore@0: fiore@0: public AccessibleTextView(Context context) { fiore@0: super(context); fiore@0: } fiore@0: fiore@0: public AccessibleTextView(Context context, AttributeSet attrs) { fiore@0: super(context, attrs); fiore@0: } fiore@0: fiore@0: public AccessibleTextView(Context context, AttributeSet attrs, int defStyle) { fiore@0: super(context, attrs, defStyle); fiore@0: } fiore@0: fiore@0: /** fiore@0: * This method is empty to prevent the screen reader to speak when clicking on this text view. fiore@0: */ fiore@0: @Override fiore@0: public void sendAccessibilityEvent(int eventType){} fiore@0: fiore@0: /** fiore@0: * This method is empty to prevent the screen reader to speak when clicking on this text view. fiore@0: */ fiore@0: @Override fiore@0: public void sendAccessibilityEventUnchecked(AccessibilityEvent event){} fiore@0: fiore@0: }