Class AccessibleCheckbox
- java.lang.Object
-
- LinearLayout
-
- uk.ac.qmul.eecs.ccmi.accessibility.AccessibleCheckbox
-
public class AccessibleCheckbox extends LinearLayout
A check box list that can be operated without looking at the display.
-
-
Constructor Summary
Constructors Constructor and Description AccessibleCheckbox(Context context)
AccessibleCheckbox(Context context, AttributeSet attrs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description AccessibilityService
getAccessibilityService()
Returns a reference to theaccessibility
service for this class.boolean[]
getChecks()
Returns the checks of the current values.java.lang.String
getSelectedValue()
Returns the currently selected value of the list.int
getSelectedValuePosition()
Returns the position in the list of the currently selected value.void
sendAccessibilityEvent(int eventType)
This method is empty to prevent the screen reader to speak when clicking on this text view.void
sendAccessibilityEventUnchecked(AccessibilityEvent event)
This method is empty to prevent the screen reader to speak when clicking on this text view.void
setAccessibilityService(AccessibilityService service)
Sets theaccessibility
service for this class.void
setValues(java.lang.String[] values, boolean[] valueChecks)
Sets the values to display to the user.
-
-
-
Constructor Detail
-
AccessibleCheckbox
public AccessibleCheckbox(Context context)
-
AccessibleCheckbox
public AccessibleCheckbox(Context context, AttributeSet attrs)
-
-
Method Detail
-
setAccessibilityService
public void setAccessibilityService(AccessibilityService service)
Sets theaccessibility
service for this class.- Parameters:
service
- theAccessibilityService
for this class
-
getAccessibilityService
public AccessibilityService getAccessibilityService()
Returns a reference to theaccessibility
service for this class.- Returns:
- the
AccessibilityService
for this class
-
setValues
public void setValues(java.lang.String[] values, boolean[] valueChecks)
Sets the values to display to the user.- Parameters:
values
- the values to displayvalueChecks
- The initial checks. IfvalueChecks[i]
istrue
thenvalues[i]
will be checked when displayed to the user
-
getChecks
public boolean[] getChecks()
Returns the checks of the current values. To be called after this checkbox has been displayed to the user to collect their checks.- Returns:
- the current checks
-
getSelectedValue
public java.lang.String getSelectedValue()
Returns the currently selected value of the list.- Returns:
- the currently selected value of the list
-
getSelectedValuePosition
public int getSelectedValuePosition()
Returns the position in the list of the currently selected value.- Returns:
- the position in the list of the currently selected value
-
sendAccessibilityEvent
public void sendAccessibilityEvent(int eventType)
This method is empty to prevent the screen reader to speak when clicking on this text view.
-
sendAccessibilityEventUnchecked
public void sendAccessibilityEventUnchecked(AccessibilityEvent event)
This method is empty to prevent the screen reader to speak when clicking on this text view.
-
-