classDiagram
AbstractMainActivity <|-- ExperimentActivity
AbstractMainActivity <|-- TestActivity
AbstractMenuExperimentView <|-- MenuExperimentView
MenuExperimentView <|-- PieMenuView
MenuExperimentView <|-- NormalMenuView
MenuExperimentView <|-- CustomMenuView
class MenuExperimentView {
essentialGeometry()
onTouchEvent()
startSelection()
endSelection()
updateModel()
}
]
.right-column-half[
## Enums
Used for PPS in Menu assignment *and* for experimental conditions. [Documentation](https://docs.oracle.com/javase/tutorial/java/javaOO/enum.html)
classDiagram
class State {
START
SELECTING
}
class MenuType {
NORMAL
PIE
CUSTOM
}
class TaskType {
LINEAR
RELATIVE
UNCLASS
}
]
???
Enums
- Used for PPS in ColorPicker (PPS States; Essential Geometry)
- Used for PPS in Menu assignment *and* for experimental conditions
- Easy to inspect if you want to (can use to determine possible states, number items, etc)
---
# What is a Menu in theory?
???
- Supports selection of an item from a fixed set of options
- Options are set and determined in advance
- Typically used for “commands” (verbs, things to do)
- Occasionally for selecting a value (e.g., picking a font)
--
count: false
.left-column-half[
- Supports selection of an item from a fixed set of options
- Options are set and determined in advance
- Typically used for “commands” (verbs, things to do)
- Occasionally for selecting a value mColorChangeListeners;
// Class which defines a listener to be called when a new color is selected.
public interface ColorChangeListener {
void onColorSelected(@ColorInt int color);
}
// Registers a new listener
public final void addColorChangeListener(@NonNull ColorChangeListener colorChangeListener) {
mColorChangeListeners.add(colorChangeListener);
}
```
---
# Example Custom Listener -- ColorPicker:
You implemented this
```java
// TODO: Register callback to update {color,label}
// View when color changed.`
```
.left-column60[
What method do we call to register the callback?
`addColorChangeListener()`
]
.right-column40[
classDiagram
MainActivity ..> ColorPickerView : addColorChangeListener()
MainActivity --> ColorChangeListener : Contains
class ColorChangeListener {
onColorChanged()
}
class ColorPickerView {
addColorChangeListener()
}
]
---
# Example Custom Listener -- ColorPicker:
You implemented this
```java
// TODO: Register callback to update {color,label}
// View when color changed.`
```
.left-column60[
What method do we call to register the callback? `addColorChangeListener()`
What do we usually do in a callback?
Update the application's (`MainActivity`) model
]
.right-column40[
classDiagram
ColorPickerView ..> ColorChangeListener : onColorChanged()
ColorChangeListener ..> MainActivity : update model
class ColorChangeListener {
onColorChanged()
}
class MainActivity {
ColorPickerView view
}
]
---
# Registering a TrialListener in Menus
In `ExperimentActivity` to record the results of a trial
```java
// TODO: register a TrialListener with the menu:
// TODO: When the user completes a trial, the menu listener should take care of the following:
// TODO: 1. Write the result to your CSV file. This should be accomplished with
// ExperimentSession.recordResult().
// TODO: 2. show the menu for the next trial, if there is another trial available.
// TODO: 3. If another trial is not available, announce with a Toast and change the text in the
// instruction view to say the session is completed by using R.string.session_completed
// from strings.xml. For completeness, don’t forget to reset the session (to null)
// if you are done with all of the sessions.
```
---
class: center, middle, inverse
# Experimenting with Interfaces
Important part of building interfaces is experimenting
Need structured ways to decide what's better
---
# Experiments should be tied to *hypotheses* based on *theories* what will go better
- Fitts Law (compare distance and size; check for infinite size)
- Steering Law (distance and size over a path)
- Cognitive modeling (complex multi-step model of expert behavior)
- Does someone have to 'check' something? More than once?
- Do they have to move? More than once
- Gestalt Psychology (will they see it at all?)
- Errors (will they be reduced)
???
why theory and not intuition?
---
# Which is better and why?
.left-column50[
## A. Pie Menu
![:img Pie Menu, 80%,width](img/menus/pie.jpg)
]
.right-column50[
## B. Pull down Menu
![:img Traditional Menu inside a web browser, 80%,width](img/menus/menu.png)
]
???
What analysis methods can we use to predict?
- Fitts Law (compare distance and size; check for infinite size)
- *Steering Law* (distance and size over a path)
- Cognitive modeling (complex multi-step model of expert behavior)
- Does someone have to 'check' something? More than once?
- Do they have to move? More than once
- Gestalt Psychology (will they see it at all?)
- Errors (will they be reduced)
---
# Steering Law (based on Fitts' law)
.left-column50[
## A. Pie Menu
![:img Pie Menu, 80%,width](img/menus/pie.jpg)
]
.right-column50[
## B. Pull down Menu
![:img Traditional Menu inside a web browser, 80%,width](img/menus/menu.png)
]
---
# Which is better and why?
.left-column50[
## A. Pie Menu
![:img Pie Menu, 80%,width](img/menus/pie.jpg)
]
.right-column50[
## B. Marking Menu
![:youtube Video assigned before class, 8c58bN6ajJ4?t=30]
]
???
- Fitts Law (compare distance and size; check for infinite size)
- Steering Law (distance and size over a path)
- Cognitive modeling (complex multi-step model of expert behavior)
- **Does someone have to 'check' something? More than once?**
- **Do they have to move? More than once**
- Gestalt Psychology (will they see it at all?)
- Errors (will they be reduced)
---
# Cognitive modeling (less double checking)
.left-column50[
## A. Pie Menu
![:img Pie Menu, 80%,width](img/menus/pie.jpg)
]
.right-column50[
## B. Marking Menu
![:youtube Video assigned before class, 8c58bN6ajJ4?t=30]
]
---
# Which is better and why?
A: Tapping B: Crossing
![:youtube Video of using crossing for selection, kp2Zl4ONuik]
???
- **Fitts Law (compare distance and size; check for infinite size)**
- Steering Law (distance and size over a path)
- Cognitive modeling (complex multi-step model of expert behavior)
- Does someone have to 'check' something? More than once?
- Do they have to move? More than once
- Gestalt Psychology (will they see it at all?)
- Errors (will they be reduced)
---
# Fitts' Law (infinite width)
.left-column60[
A: Tapping B: Crossing
![:img screen capture of the video showing both a tap target and a swipe, 100%, width](img/menus/tapping-crossing.png)
]
.right-column40[
Examples of crossing
- [Fruit Ninja](https://www.halfbrick.com/games/fruit-ninja)
- Swipe keyboard interactions
- Swiping to skip something, like a song in Spotify
]
---
# Back to comparing menus
Kurtenbach: What did they study here?
![:youtube Illustration of advantages of marking menus,dtH9GdFSQaw]
---
# How do we prove our theories? Hypothesis
graph LR
S((.)) --> Hypothesis(Hypothesis)
classDef finish outline-style:double,fill:#d1e0e0,stroke:#333,stroke-width:2px;
classDef normal fill:#e6f3ff,stroke:#333,stroke-width:2px;
classDef start fill:#d1e0e0,stroke:#333,stroke-width:4px;
classDef invisible fill:#FFFFFF,stroke:#FFFFFF,color:#FFFFFF
linkStyle 0 stroke-width:4px;
class S invisible
class Hypothesis start
Discuss
--
Marking Menus are better than Pie Menus
--
Marking Menus are *faster* than Pie Menus
--
Pie Menus are faster than Linear Menus for less than 8 items that have no obvious order
---
.left-column-half[
# What conditions does this experiment have?
`MenuType`
`TaskType` (could be a condition)
]
.right-column-half[
# What might we measure? (from POP-Motor)
]
--
.right-column-half[
- Time on Task
- Accuracy
- How strenuous
- Recall
- Emotional Response
]
---
# How do we prove our theories? Method
graph LR
S((.)) --> Hypothesis(Hypothesis)
Hypothesis -- "Study Design" --> Method(Method)
classDef finish outline-style:double,fill:#d1e0e0,stroke:#333,stroke-width:2px;
classDef normal fill:#e6f3ff,stroke:#333,stroke-width:2px;
classDef start fill:#d1e0e0,stroke:#333,stroke-width:4px;
classDef invisible fill:#FFFFFF,stroke:#FFFFFF,color:#FFFFFF
linkStyle 0 stroke-width:4px;
linkStyle 1 stroke-width:4px;
class S invisible
class Hypothesis start
class Method normal
Compare specific conditions
| MenuType | 8 items | 12 items |
|----------|---------|----------|
| Linear | | |
| Pie | | |
| Marking | | |
What if we wanted to do length AND ordered vs not?
Want to consider every combination, or run twice (menuType x length and menuType x ordering)
---
# How do we prove our theories? Data
graph LR
S((.)) --> Hypothesis(Hypothesis)
Hypothesis -- "Study Design" --> Method(Method)
Method -- "Run Study" --> Data(Data)
classDef finish outline-style:double,fill:#d1e0e0,stroke:#333,stroke-width:2px;
classDef normal fill:#e6f3ff,stroke:#333,stroke-width:2px;
classDef start fill:#d1e0e0,stroke:#333,stroke-width:4px;
classDef invisible fill:#FFFFFF,stroke:#FFFFFF,color:#FFFFFF
linkStyle 0 stroke-width:4px;
linkStyle 1 stroke-width:4px;
linkStyle 2 stroke-width:4px;
class S invisible
class Hypothesis start
class Method,Data normal
What might we want to measure?
--
count:false
- Time on task -- how long to complete basic tasks? (For example, find something to buy, create a new account, and order the item.)
--
count:false
- Accuracy -- How many mistakes did people make? (And were they fatal or recoverable with the right information?)
--
count:false
- How strenuous (e.g. gaze has lower throughput but is less strenuous than head pointing (Mackenzie 2018)
--
count:false
- Recall -- How much does the person remember afterwards or after periods of non-use?
--
count:false
- Emotional Response -- How does the person feel about the tasks completed? (Confident? Stressed? Would the user recommend this system to a friend?)
???
Build up a list of good UI design principals from these basics
Undo
Predictability
... What is missing? (e.g. fun)
---
# How to get such data?
- Video
- Timestamps
- Notes
- Can transcribe and analyze interviews with users
- Can look for patterns across users
---
# How do we prove our theories? Analysis
graph LR
S((.)) --> Hypothesis(Hypothesis)
Hypothesis -- "Study Design" --> Method(Method)
Method -- "Run Study" --> Data(Data)
Data -- "Clean and Prep" --> Analysis(Analysis)
classDef finish outline-style:double,fill:#d1e0e0,stroke:#333,stroke-width:2px;
classDef normal fill:#e6f3ff,stroke:#333,stroke-width:2px;
classDef start fill:#d1e0e0,stroke:#333,stroke-width:4px;
classDef invisible fill:#FFFFFF,stroke:#FFFFFF,color:#FFFFFF
linkStyle 0 stroke-width:4px;
linkStyle 1 stroke-width:4px;
linkStyle 2 stroke-width:4px;
linkStyle 3 stroke-width:4px;
class S invisible
class Hypothesis start
class Method,Data,Analysis normal
![:img sample data from the menus experiement, 80%,width](img/menus/menus-data.png)
---
# How do we prove our theories? Conclusions
graph LR
S((.)) --> Hypothesis(Hypothesis)
Hypothesis -- "Study Design" --> Method(Method)
Method -- "Run Study" --> Data(Data)
Data -- "Clean and Prep" --> Analysis(Analysis)
Analysis --> Conclusions(Conclusions)
classDef finish outline-style:double,fill:#d1e0e0,stroke:#333,stroke-width:2px;
classDef normal fill:#e6f3ff,stroke:#333,stroke-width:2px;
classDef start fill:#d1e0e0,stroke:#333,stroke-width:4px;
classDef invisible fill:#FFFFFF,stroke:#FFFFFF,color:#FFFFFF
linkStyle 0 stroke-width:4px;
linkStyle 1 stroke-width:4px;
linkStyle 2 stroke-width:4px;
linkStyle 3 stroke-width:4px;
linkStyle 4 stroke-width:4px;
class S invisible
class Hypothesis,Conclusions start
class Method,Data,Analysis normal
![:img sample data from the menus experiement, 30%,width](img/menus/histogram.png)
---
# Design an experiment
graph LR
S((.)) --> Hypothesis(Hypothesis)
Hypothesis -- "Study Design" --> Method(Method)
Method -- "Run Study" --> Data(Data)
Data -- "Clean and Prep" --> Analysis(Analysis)
Analysis --> Conclusions(Conclusions)
classDef finish outline-style:double,fill:#d1e0e0,stroke:#333,stroke-width:2px;
classDef normal fill:#e6f3ff,stroke:#333,stroke-width:2px;
classDef start fill:#d1e0e0,stroke:#333,stroke-width:4px;
classDef invisible fill:#FFFFFF,stroke:#FFFFFF,color:#FFFFFF
linkStyle 0 stroke-width:4px;
linkStyle 1 stroke-width:4px;
linkStyle 2 stroke-width:4px;
linkStyle 3 stroke-width:4px;
linkStyle 4 stroke-width:4px;
class S invisible
class Hypothesis,Conclusions start
class Method,Data,Analysis normal
.left-column50[
## A.
![:img Picture of the Graffiti gesture recognition alphabet from the Palm Pilot, 100%,width](img/menus/Grafitti.png)
]
.right-column50[
## B.
![:img Picture of the Edgewrite gesture recognition alphabet, 50%,width](img/menus/Edgewrite.png)
]
???
Hypothesis: Errors (will they be reduced)
Method:??
Data:??
Analysis??
Conclusions??
---
# Design an experiment
graph LR
S((.)) --> Hypothesis(Hypothesis)
Hypothesis -- "Study Design" --> Method(Method)
Method -- "Run Study" --> Data(Data)
Data -- "Clean and Prep" --> Analysis(Analysis)
Analysis --> Conclusions(Conclusions)
classDef finish outline-style:double,fill:#d1e0e0,stroke:#333,stroke-width:2px;
classDef normal fill:#e6f3ff,stroke:#333,stroke-width:2px;
classDef start fill:#d1e0e0,stroke:#333,stroke-width:4px;
classDef invisible fill:#FFFFFF,stroke:#FFFFFF,color:#FFFFFF
linkStyle 0 stroke-width:4px;
linkStyle 1 stroke-width:4px;
linkStyle 2 stroke-width:4px;
linkStyle 3 stroke-width:4px;
linkStyle 4 stroke-width:4px;
class S invisible
class Hypothesis,Conclusions start
class Method,Data,Analysis normal
.left-column50[
## A. Pie Menu
![:img Pie Menu, 80%,width](img/menus/pie.jpg)
]
.right-column50[
## B. Pull down Menu
![:img Traditional Menu inside a web browser, 80%,width](img/menus/menu.png)
]
???
Hypothesis: Errors will be reduced;
Hypothesis: Motion will be faster due to low level motor things
Hypothesis: fewer cognitive checks needed
Method:??
Data:??
Analysis??
Conclusions??