public class TextDie
extends Die
Class that models a Text Die. It can display arbitrary numbers instead of a finite amount of eyes
Constructor and Description |
---|
TextDie(BaseActivity context,
android.widget.TextView view,
Theme theme,
java.lang.String storedValueKey,
int initialValue,
int limit,
int minimum,
int wiggleAnimationResource)
Class that models a Text Die. It can display arbitrary numbers instead of a finite amount
of eyes
|
Modifier and Type | Method and Description |
---|---|
void |
draw()
Draws the current value of the Die as a TextView, applying the current theme
|
void |
updateRange(android.widget.EditText startEdit,
android.widget.EditText endEdit)
Updates the Range of the die. If the end value is smaller than the start value,
the values are flipped around.
|
draw, getContext, getCurrentValue, getLimit, getMinimum, getRandom, getStoredValueKey, getTheme, getValue, getView, getWiggleAnimationResource, isAnimating, next, nextRandomNumber, roll, setCurrentValue, setLimit, setMinimum, setTheme, updateTheme
public TextDie(BaseActivity context, android.widget.TextView view, Theme theme, java.lang.String storedValueKey, int initialValue, int limit, int minimum, int wiggleAnimationResource)
Class that models a Text Die. It can display arbitrary numbers instead of a finite amount of eyes
context
- : The Activity that uses this dieview
- : The View of the Die, which is a TextViewtheme
- : The theme to be applied to the diestoredValueKey
- : The key string used to store the current value in the shared preferenceslimit
- : The upper limit of the dieminimum
- : The lower limit of the diewiggleAnimationResource
- : Overrides the wiggle animation if setcontext
- : The Activity that uses this dieview
- : The View of the Die, which is a TextViewtheme
- : The theme to be applied to the diestoredValueKey
- : The key string used to store the current value in the shared preferenceslimit
- : The upper limit of the dieminimum
- : The lower limit of the diewiggleAnimationResource
- : Overrides the wiggle animation if setpublic void draw()
Draws the current value of the Die as a TextView, applying the current theme
public void updateRange(android.widget.EditText startEdit, android.widget.EditText endEdit)
Updates the Range of the die. If the end value is smaller than the start value, the values are flipped around.
startEdit
- : The Start Range EditTextendEdit
- : The End Range EditText