public class FittsTouchActivity
extends android.app.Activity
implements android.view.View.OnTouchListener
The parameters are embedded in the application. The default settings (shown) may be changed by selecting the corresponding spinner. Changes may be saved. Saved changes become the default settings when the application is next launched.
The setup parameters are as follows:
Parameter Description Participant code Identifies the current participant.
Session code Identifies the session. This code is useful if testing proceeds over multiple sessions to gauge the progression of learning.
Block code (auto) Identifies the block of testing. This code is generated automatically. The first block of testing is "B01", then "B02", and so on. Output data files include the block code in the filename. The first available block code is used in opening data files for output. This prevents overwriting data from an earlier block of testing.
Group code Identifies the group to which the participant was assigned. This code is needed if counterbalancing was used (i.e., participants were assigned to groups to offset order effects). This is common practice for testing the levels of a within-subjects independent variable.
Condition code An arbitrary code to associate a test condition with a block of trials. This parameter might be useful if the user study includes conditions that are not inherently part of the application (e.g., Gender → male, female; User stance → sitting, standing, walking).
Mode Set to either "1D" or "2D" to control whether the task is one-dimensional or two-dimensional.
NOTE: The setup parameters above appear in the filename for the output data files (e.g., FittsTouch-P01-S01-B01-G01-C01-1D.sd1
). They also appear as data columns in the output data files.Number of trials (1D) Specifies the number of back-and-forth selections in a block of trials. This setup parameter is only relevant if Mode = 1D.
Number of targets (2D) Specifies the number of targets that appear in the layout circle. This setup parameter is only relevant if Mode = 2D.
Target amplitude (A) Specifies either the diameter of the layout circle (2D) or the center-to-center distance between targets (1D). The spinner offers three choices: "120, 240, 480", "250, 500", or "500" (but see note 2 below).
Target width (W) Specifies the width of targets. This is either the diameter of the target circles (2D) or the width of the rectangles (1D). The spinner offers three choices: "60, 100", "30, 60, 120", or "100", Notes:
1. The total number of A-W conditions (sequences) in a block is n × m, where n is the number of target amplitudes and m is the number of target widths.
2. The A-W values are scaled such that the widest condition (largest A, largest W) spans the device's display with minus 10 pixels on each side.
Vibrotactile feedback A checkbox parameter. If checked, a 10 ms vibrotactile pulse is emitted if a target is selected in error (i.e., the finger tap is outside the target).
Audio feedback A checkbox parameter. If checked, an auditory beep is heard if a target is selected in error (i.e., the finger tap is outside the target).
The participant selects targets by tapping with a finger. The target to tap is highlighted. Upon selection, the highlight moves to a target on the opposite side of the layout circle (2D) or to the opposing target (1D). Tapping continues until all targets are selected (2D) or until the specified number of trials is completed (1D).
The first tap to start a sequence must be correctly on the initial highlighted target. After a sequence is started, errors are permitted. If the user attempts to tap a target and the selection coordinate on finger-lift is outside the target, an error occurs. Vibrotactile or auditory feedback is emitted if the corresponding setup parameter was checked. Whether the target was hit or missed, the highlight moves to the next target.
A series of trials for a single A-W condition is called a "sequence". At the end of each sequence, results appear on the display. See below:
Once all the A-W conditions in a block are finished, the application terminates. User
performance data are saved files for follow-up analyses. The data files are located in the
device's public storage directory in a folder named FittsTouchData
.
Participant - participant code Session - session code Block - block code Group - group code Condition - condition code Mode - mode code (1D or 2D) Trial - trial number A - target amplitude W - target width FromX - x coordinate of center of from-target FromY - y coordinate of center of from-target TargetX - x coordinate of center of to-target TargetY - y coordinate of center of to-target FingerDownX - x coordinate of finger-down event at end of trial FingerDownY - y coordinate of finger-down event at end of trial SelectX - x coordinate of finger-up event at end of trial (target selection) SelectY - y coordinate of finger-up event at end of trial (target selection) xDelta - (see below) FingerDownUpDelta - Pythagorean distance between finger-down and finger-up events FingerDownUpTime - time in ms between finger-down and finger-up events DistanceFromTargetCenter - Pythagorean distance from selection coordinate to target center Miss - 0 = target selected, 1 = target missed MT - movement time in ms for the trialNote: All sizes, distances, and coordinates are in pixel units for the test device.
xDelta
is the x-distance from the selection coordinate to the center of the
target. It is normalized relative to the center of the target and to the task axis. For example,
xDelta
= 1 is the equivalent of a one-pixel overshoot while xDelta
=
−1 is the equivalent of a one-pixel undershoot. Note that xDelta
= 0 does not
mean selection was precisely at the centre of the target. It means the selection was on a line
orthogonal to the task axis going through the centre of the target. This is consistent with the
inherently one-dimensional nature of Fitts' law.
xDelta
is important for calculating Fitts' throughput. The standard deviation in the
xDelta
values collected over a sequence of trials is SDx. This is
used in the calculation of throughput (TP) as follows:
We = 4.133 × SDxIDe = log2(Ae / We + 1)
TP = IDe / MT
Participant - participant code Session - session code Block - block code Group - group code Condition - condition code Mode - mode code (1D or 2D) Trials - number of trials in the sequence SequenceRepeatCount - number of times the sequence was repeated (see below) A - specified target amplitude W - specified target width ID - specified index of difficulty Ae - actual or effective movement amplitude We - actual or effective target width IDe - actual or effective index of difficulty MT - mean movement time in ms over all trials in the sequence ErrorRate - error rate (%) TP - Fitts' throughput in bits per secondThe
SequenceRepeatCount
is used in conjunction with an outlier criterion. Any trial
where the actual distance traversed is less the ½ the specified amplitude is deemed an
outlier. The most likely cause of an outlier is either an inadvertent double-tap or a missed tap.
A sequence with 1 or more outliers is an outlier sequence and is repeated. If this occurs, an
alert popup appears at the end of the sequence to inform the participant. No data are saved for
an outlier sequence. However, the SequenceRepeatCount
entry in the sd2 file
indicates the number of times the sequence was repeated due to the outlier criterion. Usually,
SequenceRepeatCount
= 0 (hopefully!).
The last six entries in the sd2 file are user performance measures. These reflect how the user actually performed while doing the sequence of trials. The measures most commonly used as dependent variables in Fitts' law experiments are the last three: movement time, error rate, and throughput.
The following are examples of "sd" (summary data) files:
Actual output files use "FittsTouch" as the base filename. This is followed by the participant
code, the session code, the block code, the group code, the condition code, and the mode, for
example, FittsTouch-P01-S01-B01-G01-C01-1D.sd1
.
In most cases, the sd2 data files are the primary files used for data analyses in an experimental evaluation. The data in the sd2 files are full-precision, comma-delimited, to facilitate importing into a spreadsheet or statistics application. Below is an example for the sd2 file above, after importing into Microsoft Excel: (click to enlarge)
When using this application in an experiment, it is a good idea to terminate all other applications and to disable the system's WiFi and Bluetooth transceivers. This will maintain the integrity of the data collected and ensure that the application runs without hesitations.
DEFAULT_KEYS_DIALER, DEFAULT_KEYS_DISABLE, DEFAULT_KEYS_SEARCH_GLOBAL, DEFAULT_KEYS_SEARCH_LOCAL, DEFAULT_KEYS_SHORTCUT, FOCUSED_STATE_SET, RESULT_CANCELED, RESULT_FIRST_USER, RESULT_OK
ACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, APP_OPS_SERVICE, APPWIDGET_SERVICE, AUDIO_SERVICE, BATTERY_SERVICE, BIND_ABOVE_CLIENT, BIND_ADJUST_WITH_ACTIVITY, BIND_ALLOW_OOM_MANAGEMENT, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_EXTERNAL_SERVICE, BIND_IMPORTANT, BIND_NOT_FOREGROUND, BIND_WAIVE_PRIORITY, BLUETOOTH_SERVICE, CAMERA_SERVICE, CAPTIONING_SERVICE, CARRIER_CONFIG_SERVICE, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONSUMER_IR_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DISPLAY_SERVICE, DOWNLOAD_SERVICE, DROPBOX_SERVICE, FINGERPRINT_SERVICE, HARDWARE_PROPERTIES_SERVICE, INPUT_METHOD_SERVICE, INPUT_SERVICE, JOB_SCHEDULER_SERVICE, KEYGUARD_SERVICE, LAUNCHER_APPS_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MEDIA_PROJECTION_SERVICE, MEDIA_ROUTER_SERVICE, MEDIA_SESSION_SERVICE, MIDI_SERVICE, MODE_APPEND, MODE_ENABLE_WRITE_AHEAD_LOGGING, MODE_MULTI_PROCESS, MODE_NO_LOCALIZED_COLLATORS, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NETWORK_STATS_SERVICE, NFC_SERVICE, NOTIFICATION_SERVICE, NSD_SERVICE, POWER_SERVICE, PRINT_SERVICE, RESTRICTIONS_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, SHORTCUT_SERVICE, STORAGE_SERVICE, SYSTEM_HEALTH_SERVICE, TELECOM_SERVICE, TELEPHONY_SERVICE, TELEPHONY_SUBSCRIPTION_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, TV_INPUT_SERVICE, UI_MODE_SERVICE, USAGE_STATS_SERVICE, USB_SERVICE, USER_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_P2P_SERVICE, WIFI_SERVICE, WINDOW_SERVICE
Constructor and Description |
---|
FittsTouchActivity() |
Modifier and Type | Method and Description |
---|---|
void |
doFingerDown(float xArg,
float yArg) |
void |
doStartCircleSelected() |
void |
onCreate(android.os.Bundle savedInstanceState)
Called when the activity is first created.
|
boolean |
onTouch(android.view.View v,
android.view.MotionEvent me) |
addContentView, closeContextMenu, closeOptionsMenu, createPendingResult, dismissDialog, dismissKeyboardShortcutsHelper, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, dump, enterPictureInPictureMode, findViewById, finish, finishActivity, finishActivityFromChild, finishAffinity, finishAfterTransition, finishAndRemoveTask, finishFromChild, getActionBar, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getContentScene, getContentTransitionManager, getCurrentFocus, getFragmentManager, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLoaderManager, getLocalClassName, getMediaController, getMenuInflater, getParent, getParentActivityIntent, getPreferences, getReferrer, getRequestedOrientation, getSearchEvent, getSystemService, getTaskId, getTitle, getTitleColor, getVoiceInteractor, getVolumeControlStream, getWindow, getWindowManager, hasWindowFocus, invalidateOptionsMenu, isChangingConfigurations, isChild, isDestroyed, isFinishing, isImmersive, isInMultiWindowMode, isInPictureInPictureMode, isLocalVoiceInteractionSupported, isTaskRoot, isVoiceInteraction, isVoiceInteractionRoot, managedQuery, moveTaskToBack, navigateUpTo, navigateUpToFromChild, onActionModeFinished, onActionModeStarted, onActivityReenter, onActivityResult, onApplyThemeResource, onAttachedToWindow, onAttachFragment, onBackPressed, onChildTitleChanged, onConfigurationChanged, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreate, onCreateContextMenu, onCreateDescription, onCreateDialog, onCreateDialog, onCreateNavigateUpTaskStack, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onCreateThumbnail, onCreateView, onCreateView, onDestroy, onDetachedFromWindow, onEnterAnimationComplete, onGenericMotionEvent, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onLocalVoiceInteractionStarted, onLocalVoiceInteractionStopped, onLowMemory, onMenuItemSelected, onMenuOpened, onMultiWindowModeChanged, onNavigateUp, onNavigateUpFromChild, onNewIntent, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPause, onPictureInPictureModeChanged, onPostCreate, onPostCreate, onPostResume, onPrepareDialog, onPrepareDialog, onPrepareNavigateUpTaskStack, onPrepareOptionsMenu, onPreparePanel, onProvideAssistContent, onProvideAssistData, onProvideKeyboardShortcuts, onProvideReferrer, onRequestPermissionsResult, onRestart, onRestoreInstanceState, onRestoreInstanceState, onResume, onRetainNonConfigurationInstance, onSaveInstanceState, onSaveInstanceState, onSearchRequested, onSearchRequested, onStart, onStateNotSaved, onStop, onTitleChanged, onTouchEvent, onTrackballEvent, onTrimMemory, onUserInteraction, onUserLeaveHint, onVisibleBehindCanceled, onWindowAttributesChanged, onWindowFocusChanged, onWindowStartingActionMode, onWindowStartingActionMode, openContextMenu, openOptionsMenu, overridePendingTransition, postponeEnterTransition, recreate, registerForContextMenu, releaseInstance, removeDialog, reportFullyDrawn, requestDragAndDropPermissions, requestPermissions, requestShowKeyboardShortcuts, requestVisibleBehind, requestWindowFeature, runOnUiThread, setActionBar, setContentTransitionManager, setContentView, setContentView, setContentView, setDefaultKeyMode, setEnterSharedElementCallback, setExitSharedElementCallback, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setFinishOnTouchOutside, setImmersive, setIntent, setMediaController, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setTaskDescription, setTheme, setTitle, setTitle, setTitleColor, setVisible, setVolumeControlStream, setVrModeEnabled, shouldShowRequestPermissionRationale, shouldUpRecreateTask, showAssist, showDialog, showDialog, showLockTaskEscapeMessage, startActionMode, startActionMode, startActivities, startActivities, startActivity, startActivity, startActivityForResult, startActivityForResult, startActivityFromChild, startActivityFromChild, startActivityFromFragment, startActivityFromFragment, startActivityIfNeeded, startActivityIfNeeded, startIntentSender, startIntentSender, startIntentSenderForResult, startIntentSenderForResult, startIntentSenderFromChild, startIntentSenderFromChild, startLocalVoiceInteraction, startLockTask, startManagingCursor, startNextMatchingActivity, startNextMatchingActivity, startPostponedEnterTransition, startSearch, stopLocalVoiceInteraction, stopLockTask, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterForContextMenu
applyOverrideConfiguration, attachBaseContext, getAssets, getResources, getTheme
bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkSelfPermission, checkUriPermission, checkUriPermission, clearWallpaper, createConfigurationContext, createDeviceProtectedStorageContext, createDisplayContext, createPackageContext, databaseList, deleteDatabase, deleteFile, deleteSharedPreferences, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getBaseContext, getCacheDir, getClassLoader, getCodeCacheDir, getContentResolver, getDatabasePath, getDataDir, getDir, getExternalCacheDir, getExternalCacheDirs, getExternalFilesDir, getExternalFilesDirs, getExternalMediaDirs, getFilesDir, getFileStreamPath, getMainLooper, getNoBackupFilesDir, getObbDir, getObbDirs, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getSharedPreferences, getSystemServiceName, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isDeviceProtectedStorage, isRestricted, moveDatabaseFrom, moveSharedPreferencesFrom, openFileInput, openFileOutput, openOrCreateDatabase, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeUriPermission, sendBroadcast, sendBroadcast, sendBroadcastAsUser, sendBroadcastAsUser, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, setWallpaper, setWallpaper, startInstrumentation, startService, stopService, unbindService, unregisterReceiver
public void onCreate(android.os.Bundle savedInstanceState)
onCreate
in class android.app.Activity
public boolean onTouch(android.view.View v, android.view.MotionEvent me)
onTouch
in interface android.view.View.OnTouchListener
public void doFingerDown(float xArg, float yArg)
public void doStartCircleSelected()