public class FittsDragAndDropActivity extends android.app.Activity implements android.view.View.OnTouchListener, android.media.MediaPlayer.OnCompletionListener
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.,
FittsDragAndDrop-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 several choices (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 several choices (but see note 2 below).
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 1/16 inch 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-up action 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-up action is outside the target).
Speech feedback A checkbox parameter. This option is for use with children. See "Using FittsDragAndDrop With Children" below.
FittsFarm style A checkbox parameter. This option is for use with children. See "Using FittsDragAndDrop With Children" below.
Show all targets A checkbox parameter. If checked, all targets appear. This is the default option. See "Operation", below. If unchecked, only the drag object and the target appear, as shown below.
The participant selects targets using drag-and-drop operations. Each trial requires a drag operation between a "from" target and a "to" target. The drag object appears in the "from" target as a black circle, which is either 1/4 inch wide or the width of the smallest target in the block, whichever is less. The drag object is acquired by a finger-down or stylus-down action. A down-action anywhere within the "from" target circle is sufficient to acquire the drag object. When acquired, the drag object snaps to the location of the finger-down or stylus-down action. The drag object is then dragged to the "to" target and dropped by a finger-up or stylus-up action. A "tick" audio sound is heard on finger-up or stylus-up (if audio feedback is enabled).
While dragging, a gradient heat map appears at the location of finger or stylus contact on the display. This provides additional visual feedback for the dragging operation. See below.
For the 2D mode, drag-and-drops proceed in a pattern moving around the layout circle. Each "from" target is the last "to" target. Each new "to" target is beside the last "from" target, so as to proceed around the layout circle. For the 1D mode, drag-and-drops proceed back and forth until the specified number of selections have occurred.
Timing for a sequence begins on the first up-action (on the first target) and ends on the last up-action (on the last target). Bear in mind that participants should not pause between drag-and-drop operations, because the time for each trial begins on the finger-up or stylus-up action that ended the previous trial. This is consistent with the "serial tapping task" paradigm used in Fitts' law experiments.
Each trial must begin correctly, which is to say, the finger- or stylus-down action must be within the "from" target where the drag object appears. Errors at the end of trials are permitted, however. If the finger- or stylus-up action is outside the "to" target, the trial ends, an error is logged, and an auditory beep and vibrotactile pulse are emitted (if the corresponding options are selected). The only requirement is that for each trial the movement distance in the direction of the "to" target must be at least half the required movement distance. This is implemented to avoid severe outliers, which occur, for example, if the participant "drops" a target immediately upon acquiring it or perhaps inadvertently does a double-selection. If a outlier trial is detected, a popup dialog appears and the sequence must be restarted. The number of such events appears as a "sequence repeat count" in the sd2 output data file.
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, user performance data are saved in files and the
application returns to the setup dialog. The data files are located in the device's public storage directory in a
FittsDragAndDrag has two setup options to configure the interaction to suit research with children. If the "Fitts Farm style" checkbox option is selected, the introductory screen announces that there are animals in need of feeding (below, left). Another option, "Speech feedback", adds (annoying!) speech feedback about the animals being hungry, etc.
In the style of Fitts Farm, an apple is used as the drag object and a graphic image of an animal appears in the target circle (above, right). The animal image is resized to fill the target circle. The application includes about 15 animal images:
The target image changes randomly from trial to trial.
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 PickupMisses - number of times the drag object was missed at the beginning of trial Error - 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 finger-up 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.
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
values collected over a sequence of trials is SDx. This is used in the calculation of throughput
(TP) as follows:
We = 4.133 × SDx
IDe = 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 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 (*) PickupMisses - number of times the drag object was missed at the beginning of a trial (*) SequenceRepeatCount - number of times the sequence was repeated (see below) (*) MT - mean movement time in ms over all trials in the sequence (*) ErrorRate - error rate (%) (*) TP - Fitts' throughput in bits per second (*)The entries above with asterisks (*) 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.
SequenceRepeatCount is used in conjunction with the outlier criterion described above. 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
The following are examples of "sd" (summary data) files:
Actual output files use "FittsDragAndDrop" 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,
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|
|Modifier and Type||Method and Description|
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, 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
getColor, getColorStateList, getDrawable, getString, getString, getSystemService, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, registerComponentCallbacks, unregisterComponentCallbacks
public void onCreate(android.os.Bundle savedInstanceState)
public void onStop()
public void onCompletion(android.media.MediaPlayer mp)
public boolean onTouch(android.view.View v, android.view.MotionEvent me)
public void doDragObjectBegin(float xArg, float yArg)
public void doDragObject(float xArg, float yArg)
public void doStartCircleSelected()
public int getDefaultOrientation()
public int getCurrentRotation()