diff src/uk/ac/qmul/eecs/ccmi/accessibility/AccessibleCheckbox.java @ 1:66b3a838feca logging tip

Added logging of user interaction
author Fiore Martin <fiore@eecs.qmul.ac.uk>
date Tue, 12 Feb 2013 15:31:48 +0000
parents e0ee6ac3a45f
children
line wrap: on
line diff
--- a/src/uk/ac/qmul/eecs/ccmi/accessibility/AccessibleCheckbox.java	Thu Dec 13 20:00:21 2012 +0000
+++ b/src/uk/ac/qmul/eecs/ccmi/accessibility/AccessibleCheckbox.java	Tue Feb 12 15:31:48 2013 +0000
@@ -19,6 +19,7 @@
 package uk.ac.qmul.eecs.ccmi.accessibility;
 
 import uk.ac.qmul.eecs.ccmi.activities.R;
+import uk.ac.qmul.eecs.ccmi.utilities.ILogger;
 import android.content.Context;
 import android.util.AttributeSet;
 import android.view.MotionEvent;
@@ -100,6 +101,7 @@
 			@Override
 			public void onClick(View view) {
 				spinner.setSelection((spinner.getSelectedItemPosition()+1) % spinner.getCount());
+				ILogger.logTap("checkbox (new value="+spinner.getSelectedItem().toString()+')');
 				if(service != null){
 					service.speak(spinner.getSelectedItem().toString()+(checks[spinner.getSelectedItemPosition()] ? " " : " un")+"checked");
 				}
@@ -118,7 +120,8 @@
 				}
 				if(service != null)
 					service.speak(spinner.getSelectedItem().toString()+(checks[spinner.getSelectedItemPosition()] ? "" : "un")+"checked");
-				
+				ILogger.log("user long tap: spinner");
+				ILogger.log(spinner.getSelectedItem().toString()+' '+(checks[spinner.getSelectedItemPosition()] ? "" : "un")+"checked");
 				spinner.setAdapter(new ArrayAdapter<String>(getContext(),R.layout.list_item_1,markedValues));
 				spinner.setSelection(itemPosition);
 				return true;