Packages

com.appaapps

Package: com.appaapps

ClassDescription
AppState Thread which constructs the current state of an app
AppState.Fact Fact details
AppState.FactComparator Sort facts by swing. If it is an ordered app, sort equal entries by fact.index so that we work through the facts in the order they are listed in the App Definition file written in the App Definition Language
AppState.FactComparator.PhotoFact PhotoFact
AppState.FactComparator.Possibility Question possibilities
AppState.FactComparator.PossibilityComparator Sort possibilities by swing. If it is an ordered app, sort equal entries by photo.index so that we work through the photos in the order they are listed in the App Definition file written in the App Definition Language
AppState.FactComparator.Question Question a user with either a photo and its title or a photofact (but not both)
AppState.FactComparator.Question.Response Rate the user response
AppState.FactComparator.SvgPhoto The Svg Image element currently being used to display a photo
AppState.Filter Filter for a specified type of object
AppState.Photo Photo details
AppState.ShowAndTell Speech and title for a fact or a photo
AppState.Speaker Speaker details
AppState.Tracker Track the score of the user of the app: Right/wrong/heard/swing in a saveable manner
Choices Choices
ColoursTransformed Transformations of a colour
Fourier Fourier stream
Fourier.Impulse A sine wave
Gradients Gradients in various patterns
Gradients.Pattern Each gradient pattern should be derived from this class
Gradients.Tartan Create a tartan paint gradient
LayoutText Draw text to fill a fractional area of a canvas, justifying remaining space
Log Logging
Maths Various mathematical methods
Midi Midi sound player
RandomChoice Random choices
Sound Sounds
Speech Speech played from mp3 files
Svg Structured Vector Graphics. Svg elements occupy fractions of the canvas which is assumed to have the approximate aspect ratio specified when creating the Svg. The elements then try to fit themselves into their fractional areas as best they can.
Svg.AFewChars A Few chars is just like text except that the gradient is across each character not the entire drawing area
Svg.Element Common features of a drawn element
Svg.Element.CenterToCenter Animation which expands an element its center is over the centre of the canvas
Svg.Element2 Common features of an element drawn with two paints - this is in effect a replacement for ComposeShader which does not seem to work - it always produces a white screen
Svg.Image Draw a bitmap image - move it around to show it all within the space available
Svg.Rectangle Draw a rectangle
Svg.Text Draw text
Unzip A thread to unzip a file

Class: AppState, package: com.appaapps

Thread which constructs the current state of an app
ReturnsMethodSignatureAttributesLineDescription
AppState AppState void public constructor 67 Create the app state from the details unpacked from the zip file - the real work is done by run() when we start this thread
void run void public 75 Construct the current state of the app by unpacking its description
void finished void public 115 Override called at end of construction thread
void save void public 118 Save app state to a known file
void restore void public 138 Restore app state from a known file

AppState() returns AppState in class AppState

Create the app state from the details unpacked from the zip file - the real work is done by run() when we start this thread

run() returns void in class AppState

Construct the current state of the app by unpacking its description

finished() returns void in class AppState

Override called at end of construction thread

save() returns void in class AppState

Save app state to a known file

restore() returns void in class AppState

Restore app state from a known file

Class: AppState.Fact, package: com.appaapps

Fact details
ReturnsMethodSignatureAttributesLineDescription
Fact Fact Unpackappdescription.FactCmd constructor 326 Describe a fact

Fact(Unpackappdescription.FactCmd) returns Fact in class AppState.Fact

Describe a fact

NameTypeLineDescription
fUnpackappdescription.FactCmd327Unpacked fact description from zip file

Class: AppState.FactComparator, package: com.appaapps

Sort facts by swing. If it is an ordered app, sort equal entries by fact.index so that we work through the facts in the order they are listed in the App Definition file written in the App Definition Language
ReturnsMethodSignatureAttributesLineDescription
int compare Fact, Fact public 337 Compare the ordering of two facts
void changeLevel void public 365 Change level when we max out the swing level of each item
int adjustNumberOfImagesToShow boolean public 380 Adjust number of images to show within limits up or down
int incNumberOfImagesToShow void public 391 Increase number of images to show
int decNumberOfImagesToShow void public 394 Decrease number of images to show

compare(Fact, Fact) returns int in class AppState.FactComparator

Compare the ordering of two facts

NameTypeLineDescription
f1Fact338First fact
f2Fact339Second fact

changeLevel() returns void in class AppState.FactComparator

Change level when we max out the swing level of each item

adjustNumberOfImagesToShow(boolean) returns int in class AppState.FactComparator

Adjust number of images to show within limits up or down

NameTypeLineDescription
upboolean381True: up, false: down

incNumberOfImagesToShow() returns int in class AppState.FactComparator

Increase number of images to show

decNumberOfImagesToShow() returns int in class AppState.FactComparator

Decrease number of images to show

Class: AppState.FactComparator.PhotoFact, package: com.appaapps

PhotoFact
ReturnsMethodSignatureAttributesLineDescription
PhotoFact PhotoFact Unpackappdescription.PhotoFact constructor 355 Describe a photo fact
String toString void public 360 Short description of photo fact

PhotoFact(Unpackappdescription.PhotoFact) returns PhotoFact in class AppState.FactComparator.PhotoFact

Describe a photo fact

NameTypeLineDescription
pfUnpackappdescription.PhotoFact356Photo fact details from unpacked zip file

toString() returns String in class AppState.FactComparator.PhotoFact

Short description of photo fact

Class: AppState.FactComparator.Possibility, package: com.appaapps

Question possibilities
ReturnsMethodSignatureAttributesLineDescription
Possibility Possibility Photo public constructor 412 A question possibility is either a photo and its title
Possibility Possibility PhotoFact public constructor 418 Or, a question possibility is a photo fact
String toString void public 424 Describe a possibility

Possibility(Photo) returns Possibility in class AppState.FactComparator.Possibility

A question possibility is either a photo and its title

NameTypeLineDescription
photoPhoto413A photo we could show the user at this point

Possibility(PhotoFact) returns Possibility in class AppState.FactComparator.Possibility

Or, a question possibility is a photo fact

NameTypeLineDescription
photoFactPhotoFact419The fact and associated photo we could show the user

toString() returns String in class AppState.FactComparator.Possibility

Describe a possibility

Class: AppState.FactComparator.PossibilityComparator, package: com.appaapps

Sort possibilities by swing. If it is an ordered app, sort equal entries by photo.index so that we work through the photos in the order they are listed in the App Definition file written in the App Definition Language
ReturnsMethodSignatureAttributesLineDescription
int compare void public 436 Compare two possibilities and order by the one most important to show to the user. Overrides: java.util.Comparator

compare() returns int in class AppState.FactComparator.PossibilityComparator

Compare two possibilities and order by the one most important to show to the user. Overrides: java.util.Comparator

Class: AppState.FactComparator.Question, package: com.appaapps

Question a user with either a photo and its title or a photofact (but not both)
ReturnsMethodSignatureAttributesLineDescription
Question Question void public constructor 495 new Question - Choose the next question, new Question(), "see how well that fits together"? - Jim Rockford!
Fact bestFact void 596 Choose the best next fact
Possibility bestPossibility void 557 Choose the best possibility for next question when not in race mode
void enterRaceModeIfReady void 607 Enter race mode
PhotoFact findPhotoFact Photo, Fact 726 Photo fact associated with this photo and fact
Photo findSelectedPhoto float, float public 715 Find the details of the photo the user selected at point(x, y)
void leaveRaceMode void 640 Leave race mode
void playMidi void public 708 Play a randomly chosen midi
void playQuestionSound void public 704 Play question for sound
boolean raceCompleted void 647 Check whether race has been completed
Response response Photo public 735 The user responded by choosing this photo - which normally produces a Response, but in race mode it does not unless the response was wrong
boolean rightAnswer Photo public 749 Whether the user chose the right answer
Svg svg int, int public 651 Construct an Svg to show the question

Question() returns Question in class AppState.FactComparator.Question

new Question - Choose the next question, new Question(), "see how well that fits together"? - Jim Rockford!

bestFact() returns Fact in class AppState.FactComparator.Question

Choose the best next fact

bestPossibility() returns Possibility in class AppState.FactComparator.Question

Choose the best possibility for next question when not in race mode

enterRaceModeIfReady() returns void in class AppState.FactComparator.Question

Enter race mode

findPhotoFact(Photo, Fact) returns PhotoFact in class AppState.FactComparator.Question

Photo fact associated with this photo and fact

NameTypeLineDescription
pPhoto727Photo
fFact728Fact

findSelectedPhoto(float, float) returns Photo in class AppState.FactComparator.Question

Find the details of the photo the user selected at point(x, y)

NameTypeLineDescription
xfloat716X coordinate of touch point
yfloat717Y coordinate of touch point

leaveRaceMode() returns void in class AppState.FactComparator.Question

Leave race mode

playMidi() returns void in class AppState.FactComparator.Question

Play a randomly chosen midi

playQuestionSound() returns void in class AppState.FactComparator.Question

Play question for sound

raceCompleted() returns boolean in class AppState.FactComparator.Question

Check whether race has been completed

response(Photo) returns Response in class AppState.FactComparator.Question

The user responded by choosing this photo - which normally produces a Response, but in race mode it does not unless the response was wrong

NameTypeLineDescription
chosenPhotoPhoto736Chosen photo

rightAnswer(Photo) returns boolean in class AppState.FactComparator.Question

Whether the user chose the right answer

NameTypeLineDescription
chosenPhotoPhoto750Photo the user chose

svg(int, int) returns Svg in class AppState.FactComparator.Question

Construct an Svg to show the question

NameTypeLineDescription
widthint652Approximate width - used only to compute the aspect ratio of the drawing area
heightint653Approximate width - used only to compute the aspect ratio of the drawing area

Class: AppState.FactComparator.Question.Response, package: com.appaapps

Rate the user response
ReturnsMethodSignatureAttributesLineDescription
Response Response Photo public constructor 760 Create the response to the user's choice
Svg svg int, int public 812 Construct an Svg to show the response

Response(Photo) returns Response in class AppState.FactComparator.Question.Response

Create the response to the user's choice

NameTypeLineDescription
chosenPhotoPhoto761The user responded by choosing this photo

svg(int, int) returns Svg in class AppState.FactComparator.Question.Response

Construct an Svg to show the response

NameTypeLineDescription
widthint813Approximate width of drawing area - used only to compute aspect ratio
heightint814Approximate width of drawing area - used only to compute aspect ratio

Class: AppState.FactComparator.SvgPhoto, package: com.appaapps

The Svg Image element currently being used to display a photo
ReturnsMethodSignatureAttributesLineDescription
SvgPhoto SvgPhoto Photo constructor 401 Connect a Photo to the Svg Image Element being used to display it

SvgPhoto(Photo) returns SvgPhoto in class AppState.FactComparator.SvgPhoto

Connect a Photo to the Svg Image Element being used to display it

NameTypeLineDescription
photoPhoto402Photo

Class: AppState.Filter, package: com.appaapps

Filter for a specified type of object
ReturnsMethodSignatureAttributesLineDescription
Filter Filter int public constructor 213 Filter of specified width
void add E public final 217 Add an element to the filter
boolean contains E public final 227 Check whether an element is in the filter

Filter(int) returns Filter in class AppState.Filter

Filter of specified width

NameTypeLineDescription
widthint214The width of the filter

add(E) returns void in class AppState.Filter

Add an element to the filter

NameTypeLineDescription
elementE218Element to add to the filter

contains(E) returns boolean in class AppState.Filter

Check whether an element is in the filter

NameTypeLineDescription
elementE228Element to check for

Class: AppState.Photo, package: com.appaapps

Photo details
ReturnsMethodSignatureAttributesLineDescription
Photo Photo Unpackappdescription.PhotoCmd constructor 283 Describe a photo
float aspectRatio void public 313 Aspect ratio for a photo
String toString void public 317 Some details of the photo

Photo(Unpackappdescription.PhotoCmd) returns Photo in class AppState.Photo

Describe a photo

NameTypeLineDescription
photoCmdUnpackappdescription.PhotoCmd284Photo details from unpacked zip file

aspectRatio() returns float in class AppState.Photo

Aspect ratio for a photo

toString() returns String in class AppState.Photo

Some details of the photo

Class: AppState.ShowAndTell, package: com.appaapps

Speech and title for a fact or a photo
ReturnsMethodSignatureAttributesLineDescription
ShowAndTell ShowAndTell TreeMap, String public constructor 245 Create a new Show and Tell
byte[] createMediaDataSource Speaker public 266 Create a ready to play media player to tell the fact or the title of the photo as spoken by a specified speaker

ShowAndTell(TreeMap, String) returns ShowAndTell in class AppState.ShowAndTell

Create a new Show and Tell

NameTypeLineDescription
soundBytesTreeMap246Speech by speaker name
titleString247Title

createMediaDataSource(Speaker) returns byte[] in class AppState.ShowAndTell

Create a ready to play media player to tell the fact or the title of the photo as spoken by a specified speaker

NameTypeLineDescription
speakerSpeaker267Speaker

Class: AppState.Speaker, package: com.appaapps

Speaker details
ReturnsMethodSignatureAttributesLineDescription
Speaker Speaker String constructor 236 Create a speaker

Speaker(String) returns Speaker in class AppState.Speaker

Create a speaker

NameTypeLineDescription
nameString237Amazon Polly Name of the speaker

Class: AppState.Tracker, package: com.appaapps

Track the score of the user of the app: Right/wrong/heard/swing in a saveable manner
ReturnsMethodSignatureAttributesLineDescription
void decSwing void public 174 Decrement swing
void incPresented void public 183 Increment number of times seen or heard
void incRight void public 177 Increment right answers
void incSwing void public 171 Increment swing
void incWrong void public 180 Increment wrong answers

decSwing() returns void in class AppState.Tracker

Decrement swing

incPresented() returns void in class AppState.Tracker

Increment number of times seen or heard

incRight() returns void in class AppState.Tracker

Increment right answers

incSwing() returns void in class AppState.Tracker

Increment swing

incWrong() returns void in class AppState.Tracker

Increment wrong answers

Class: Choices, package: com.appaapps

Choices
ReturnsMethodSignatureAttributesLineDescription
Choices Choices int, int, float, float public constructor 41 Find best layout for just two tiles - the wrong resposne display
Choices Choices int, int, int, float[] public constructor 21 Find best layout for two or more tiles
void bestLayout void public 86 Test all possible layouts and return the layout with the lowest average extension vector
double testLayout int, int 61 Test a proposed layout by calculating its extension vector

Choices(int, int, float, float) returns Choices in class Choices

Find best layout for just two tiles - the wrong resposne display

NameTypeLineDescription
widthint42Width of viewing area
heightint43Height of viewing area
aspectRatio1float44Aspect ratio of first image
aspectRatio2float45Aspect ratio of second image

Choices(int, int, int, float[]) returns Choices in class Choices

Find best layout for two or more tiles

NameTypeLineDescription
widthint22Width of viewing area
heightint23Height of viewing area
requestedint24Number of tiles requested
aspectRatiosfloat[]25Aspect ratio of each question choice with the best answer first

bestLayout() returns void in class Choices

Test all possible layouts and return the layout with the lowest average extension vector

testLayout(int, int) returns double in class Choices

Test a proposed layout by calculating its extension vector

NameTypeLineDescription
xint62Number of tiles in x
yint63Number of tiles in y

Class: ColoursTransformed, package: com.appaapps

Transformations of a colour
ReturnsMethodSignatureAttributesLineDescription
int colour int, int, int, int public static 21 Create a new colour as an int
int colour int, int, int public static 12 Create a new colour as an int with full opacity
int metal void public 129 Generate a random metallic colour
int[] metalOrVivid int public 133 Generate an array of all metal or all vivid colours at random with fractional opacity
int mix int public 143 Mix a colour at random
int opposite int public static 76 Create the opposite colour by reflecting in 0x00888888
int random void public 121 Generate a random colour
int setBlue int, int public static 51 Set blue while leaving the other components alone
int setGreen int, int public static 46 Set green while leaving the other components alone
int setOpacity int, float public static 36 Set opacity fractionally while leaving the other components alone
int setOpacity int, int public static 31 Set opacity while leaving the other components alone
int setRed int, int public static 41 Set red while leaving the other components alone
int t1 int public static 56 Transform 1 of 5 transformations of a colour excluding the identity transform
int t2 int public static 60 Transform 2 of 5 transformations of a colour excluding the identity transform
int t3 int public static 64 Transform 3 of 5 transformations of a colour excluding the identity transform
int t4 int public static 68 Transform 4 of 5 transformations of a colour excluding the identity transform
int t5 int public static 72 Transform 5 of 5 transformations of a colour excluding the identity transform
int vivid void public 125 Generate a random vivid colour

colour(int, int, int, int) returns int in class ColoursTransformed

Create a new colour as an int

NameTypeLineDescription
oint22Opacity
rint23Red
gint24Green
bint25Blue

colour(int, int, int) returns int in class ColoursTransformed

Create a new colour as an int with full opacity

NameTypeLineDescription
rint13Red
gint14Green
bint15Blue

metal() returns int in class ColoursTransformed

Generate a random metallic colour

metalOrVivid(int) returns int[] in class ColoursTransformed

Generate an array of all metal or all vivid colours at random with fractional opacity

NameTypeLineDescription
nint134Number of colours required

mix(int) returns int in class ColoursTransformed

Mix a colour at random

NameTypeLineDescription
cint144Colour to transform

opposite(int) returns int in class ColoursTransformed

Create the opposite colour by reflecting in 0x00888888

NameTypeLineDescription
cint77Colour to transform

random() returns int in class ColoursTransformed

Generate a random colour

setBlue(int, int) returns int in class ColoursTransformed

Set blue while leaving the other components alone

NameTypeLineDescription
cint52Colour being constructed
bint53Blue

setGreen(int, int) returns int in class ColoursTransformed

Set green while leaving the other components alone

NameTypeLineDescription
cint47Colour being constructed
gint48Green

setOpacity(int, float) returns int in class ColoursTransformed

Set opacity fractionally while leaving the other components alone

NameTypeLineDescription
cint37Colour being constructed
ofloat38Opacity between 0 and 1

setOpacity(int, int) returns int in class ColoursTransformed

Set opacity while leaving the other components alone

NameTypeLineDescription
cint32Colour being constructed
oint33Opacity

setRed(int, int) returns int in class ColoursTransformed

Set red while leaving the other components alone

NameTypeLineDescription
cint42Colour being constructed
rint43Red

t1(int) returns int in class ColoursTransformed

Transform 1 of 5 transformations of a colour excluding the identity transform

NameTypeLineDescription
cint57Colour to transform

t2(int) returns int in class ColoursTransformed

Transform 2 of 5 transformations of a colour excluding the identity transform

NameTypeLineDescription
cint61Colour to transform

t3(int) returns int in class ColoursTransformed

Transform 3 of 5 transformations of a colour excluding the identity transform

NameTypeLineDescription
cint65Colour to transform

t4(int) returns int in class ColoursTransformed

Transform 4 of 5 transformations of a colour excluding the identity transform

NameTypeLineDescription
cint69Colour to transform

t5(int) returns int in class ColoursTransformed

Transform 5 of 5 transformations of a colour excluding the identity transform

NameTypeLineDescription
cint73Colour to transform

vivid() returns int in class ColoursTransformed

Generate a random vivid colour

Class: Fourier, package: com.appaapps

Fourier stream
ReturnsMethodSignatureAttributesLineDescription
Fourier Fourier void constructor 33 Create a new Fourier stream
Fourier Fourier void constructor 45 Create a new Fourier stream at the default speed
float get void 49 Get the next value

Fourier() returns Fourier in class Fourier

Create a new Fourier stream

Fourier() returns Fourier in class Fourier

Create a new Fourier stream at the default speed

get() returns float in class Fourier

Get the next value

Class: Fourier.Impulse, package: com.appaapps

A sine wave
ReturnsMethodSignatureAttributesLineDescription
Impulse Impulse void constructor 23 A sine wave

Impulse() returns Impulse in class Fourier.Impulse

A sine wave

Class: Gradients, package: com.appaapps

Gradients in various patterns
ReturnsMethodSignatureAttributesLineDescription
Tartan tartan void public 15 A new tartan paint
Tartan tartan float public 19 A new tartan paint

tartan() returns Tartan in class Gradients

A new tartan paint

tartan(float) returns Tartan in class Gradients

A new tartan paint

NameTypeLineDescription
speedfloat20Speed relative to 1

Class: Gradients.Pattern, package: com.appaapps

Each gradient pattern should be derived from this class
ReturnsMethodSignatureAttributesLineDescription

Class: Gradients.Tartan, package: com.appaapps

Create a tartan paint gradient
ReturnsMethodSignatureAttributesLineDescription
void set void public 54 Set the two paints needed to draw the tartan gradient. Overrides: com.appaapps.Gradients.set

set() returns void in class Gradients.Tartan

Set the two paints needed to draw the tartan gradient. Overrides: com.appaapps.Gradients.set

Class: LayoutText, package: com.appaapps

Draw text to fill a fractional area of a canvas, justifying remaining space
ReturnsMethodSignatureAttributesLineDescription
void draw Canvas, String, float, float, float, float, int, int, Paint, Paint public static 12 Draw text to fill a fractional area of a canvas, justifying remaining space

draw(Canvas, String, float, float, float, float, int, int, Paint, Paint) returns void in class LayoutText

Draw text to fill a fractional area of a canvas, justifying remaining space

NameTypeLineDescription
canvasCanvas13Canvas to draw on
textString14Text to draw
xfloat15Area to draw text in expressed as fractions of the canvas: left x
yfloat16Area to draw text in expressed as fractions of the canvas: top y
Xfloat17Area to draw text in expressed as fractions of the canvas: right x
Yfloat18Area to draw text in expressed as fractions of the canvas: bottom y
justXint19Justification in x: -1=left, 0=center, +1=right
justYint20Justification in y: +1=bottom, 0=center, -1=top
paintFPaint21Character paint for foreground - setTextSize(128) or some other reasonable size that Android is capable of drawing text at in a hardware layer. The text will be scaled independently before it is drawn to get an optimal fit in the drawing area
paintBPaint22Optional character paint for background or null. Both foreground and background text paints must have the same textSize. The foreground is painted last over the background which is painted first.

Class: Log, package: com.appaapps

Logging
ReturnsMethodSignatureAttributesLineDescription
void say void public static 12 Say some things
void showLog Canvas public static 21 Show log

say() returns void in class Log

Say some things

showLog(Canvas) returns void in class Log

Show log

NameTypeLineDescription
cCanvas22Canvas to draw log upon

Class: Maths, package: com.appaapps

Various mathematical methods
ReturnsMethodSignatureAttributesLineDescription
int isqrt int public static 8 Integer square root - slow but rarely used for numbers above 24
int isqrt2 int public static 16 Integer fourth root - slow but rarely used for numbers above 24
float max float, float private static 21 Maximum of two floats
float min float a, float private static 28 Minimum of two floats

isqrt(int) returns int in class Maths

Integer square root - slow but rarely used for numbers above 24

NameTypeLineDescription
nint9Integer whose integer square root is required

isqrt2(int) returns int in class Maths

Integer fourth root - slow but rarely used for numbers above 24

NameTypeLineDescription
nint17Integer whose integer fourth root is required

max(float, float) returns float in class Maths

Maximum of two floats

NameTypeLineDescription
afloat22First float
bfloat23Second float

min(float a, float) returns float in class Maths

Minimum of two floats

NameTypeLineDescription
bfloat a, float29First float

Class: Midi, package: com.appaapps

Midi sound player
ReturnsMethodSignatureAttributesLineDescription
Midi Midi File public constructor 14 Create a looping Midi player
void playSound byte[] public 25 Play a midi byte stream on Android < 23
void change int public 74 Override to observe changes of media player

Midi(File) returns Midi in class Midi

Create a looping Midi player

NameTypeLineDescription
cacheDirFile15Folder holding midi files

playSound(byte[]) returns void in class Midi

Play a midi byte stream on Android < 23

NameTypeLineDescription
mdsbyte[]26Byte stream containing midi instructions

change(int) returns void in class Midi

Override to observe changes of media player

NameTypeLineDescription
iint75?

Class: RandomChoice, package: com.appaapps

Random choices
ReturnsMethodSignatureAttributesLineDescription
T chooseFromStack Stack public 15 Choose one element at random from a stack
T chooseFromArray T[] public 23 Choose one element at random from an array
T chooseFromSet Set public 31 Choose one element at random from a set
void shuffle Stack public 39 Shuffle a stack
Stack choose2 Stack public 52 Choose two elements, ideally different ones, at random

chooseFromStack(Stack) returns T in class RandomChoice

Choose one element at random from a stack

NameTypeLineDescription
sStack16Stack to choose from

chooseFromArray(T[]) returns T in class RandomChoice

Choose one element at random from an array

NameTypeLineDescription
sT[]24Array to choose from

chooseFromSet(Set) returns T in class RandomChoice

Choose one element at random from a set

NameTypeLineDescription
sSet32Set tro choose from

shuffle(Stack) returns void in class RandomChoice

Shuffle a stack

NameTypeLineDescription
sStack40Stack to shuffle

choose2(Stack) returns Stack in class RandomChoice

Choose two elements, ideally different ones, at random

NameTypeLineDescription
sStack53Stack to choose from

Class: Sound, package: com.appaapps

Sounds
ReturnsMethodSignatureAttributesLineDescription

Class: Speech, package: com.appaapps

Speech played from mp3 files
ReturnsMethodSignatureAttributesLineDescription
Speech Speech File public constructor 11 Create Speech player

Speech(File) returns Speech in class Speech

Create Speech player

NameTypeLineDescription
cacheDirFile12Folder containing files to play

Class: Svg, package: com.appaapps

Structured Vector Graphics. Svg elements occupy fractions of the canvas which is assumed to have the approximate aspect ratio specified when creating the Svg. The elements then try to fit themselves into their fractional areas as best they can.
ReturnsMethodSignatureAttributesLineDescription
Svg Svg void public constructor 21 Create an Svg
AFewChars AFewChars String, float, float, float, float, int, int protected 331 Create and push a new AFewChars element
Image Image Bitmap, float, float, float, float public 385 Create and push a new image
Rectangle Rectangle float, float, float, float protected 223 Create and push a rectangle
Text Text String, float, float, float, float, int, int protected 296 Create and push a new text element
void draw Canvas public 32 Draw the Svg on the canvas
float maxScale RectF, RectF private static 396 Maximum scale factor from first specified rectangle to the second
void onShow void protected 29 Called when this Svg is shown or reshown after some other Svg has been shown
void push Element private 24 Add an element to the stack of elements to be displayed
Bitmap testImage void static 408 Create a test image

Svg() returns Svg in class Svg

Create an Svg

AFewChars(String, float, float, float, float, int, int) returns AFewChars in class Svg

Create and push a new AFewChars element

NameTypeLineDescription
textString332The small amount of text to display
xfloat333Fractional area in which to display the text - left
yfloat334Fractional area in which to display the text - upper
𝘅float335Fractional area in which to display the text - right
𝘆float336Fractional area in which to display the text - lower
justifyXint337Justification in x per: com.appaapps.LayoutText
justifyYint338Justification in y per: com.appaapps.LayoutText

Image(Bitmap, float, float, float, float) returns Image in class Svg

Create and push a new image

NameTypeLineDescription
bitmapBitmap386Bitmap containing image
xfloat387Fraction coordinates of left edge
yfloat388Fraction coordinates of upper edge
𝘅float389Fraction coordinates of right edge
𝘆float390Fraction coordinates of lower edge

Rectangle(float, float, float, float) returns Rectangle in class Svg

Create and push a rectangle

NameTypeLineDescription
xfloat224Fractional position - left
yfloat225Fractional position - upper
𝘅float226Fractional position - right
𝘆float227Fractional position - lower

Text(String, float, float, float, float, int, int) returns Text in class Svg

Create and push a new text element

NameTypeLineDescription
textString297The text to display
xfloat298Fractional area in which to display the text - left
yfloat299Fractional area in which to display the text - upper
𝘅float300Fractional area in which to display the text - right
𝘆float301Fractional area in which to display the text - lower
justifyXint302Justification in x per: com.appaapps.LayoutText
justifyYint303Justification in y per: com.appaapps.LayoutText

draw(Canvas) returns void in class Svg

Draw the Svg on the canvas

NameTypeLineDescription
canvasCanvas33Canvas to draw on

maxScale(RectF, RectF) returns float in class Svg

Maximum scale factor from first specified rectangle to the second

NameTypeLineDescription
sourceRectF397Source rectangle
targetRectF398Target rectangle

onShow() returns void in class Svg

Called when this Svg is shown or reshown after some other Svg has been shown

push(Element) returns void in class Svg

Add an element to the stack of elements to be displayed

NameTypeLineDescription
eElement25the element to add

testImage() returns Bitmap in class Svg

Create a test image

Class: Svg.AFewChars, package: com.appaapps

A Few chars is just like text except that the gradient is across each character not the entire drawing area
ReturnsMethodSignatureAttributesLineDescription
AFewChars AFewChars String, float, float, float, float, int, int private constructor 311 Create a text area
float width void protected 321 Approximate width of object before scaling is the drawn length of the string. Overrides: com.appaapps.Svg.Element2.width
float height void protected 325 Approximate width of object before scaling is one character. Overrides: com.appaapps.Svg.Element2.height

AFewChars(String, float, float, float, float, int, int) returns AFewChars in class Svg.AFewChars

Create a text area

NameTypeLineDescription
textString312The text to display
xfloat313Fractional area in which to display the text - left
yfloat314Fractional area in which to display the text - upper
𝘅float315Fractional area in which to display the text - right
𝘆float316Fractional area in which to display the text - lower
justifyXint317Justification in x per: com.appaapps.LayoutText
justifyYint318Justification in y per: com.appaapps.LayoutText

width() returns float in class Svg.AFewChars

Approximate width of object before scaling is the drawn length of the string. Overrides: com.appaapps.Svg.Element2.width

height() returns float in class Svg.AFewChars

Approximate width of object before scaling is one character. Overrides: com.appaapps.Svg.Element2.height

Class: Svg.Element, package: com.appaapps

Common features of a drawn element
ReturnsMethodSignatureAttributesLineDescription
Element Element float, float, float, float private constructor 56 Create en element by specifying its fractional area on the canvas
void clearCenterToCenter void protected 108 Clear animation for this element
boolean contains float, float protected 84 Does this element contain the point (x, y)?
void draw Canvas protected 80 Overriden by each element to draw itself
void drawElement Canvas protected 64 Draw the SVG on a canvas
CenterToCenter setCenterToCenter double, double, double, float, float, float, float private 91 Create set Center To Center animation for this element
CenterToCenter setCenterToCenter CenterToCenter protected 103 Set Center To Center animation for this element

Element(float, float, float, float) returns Element in class Svg.Element

Create en element by specifying its fractional area on the canvas

NameTypeLineDescription
xfloat57Fractional area in which to display the element - left
yfloat58Fractional area in which to display the element - upper
𝘅float59Fractional area in which to display the element - right
𝘆float60Fractional area in which to display the element - lower

clearCenterToCenter() returns void in class Svg.Element

Clear animation for this element

contains(float, float) returns boolean in class Svg.Element

Does this element contain the point (x, y)?

NameTypeLineDescription
xfloat85Point.X
yfloat86Point.Y

draw(Canvas) returns void in class Svg.Element

Overriden by each element to draw itself

NameTypeLineDescription
canvasCanvas81Canvas on which the element would be drawn

drawElement(Canvas) returns void in class Svg.Element

Draw the SVG on a canvas

NameTypeLineDescription
canvasCanvas65Canvas to draw on

setCenterToCenter(double, double, double, float, float, float, float) returns CenterToCenter in class Svg.Element

Create set Center To Center animation for this element

NameTypeLineDescription
delaydouble92Delay before animation starts
durationdouble93Duration of expansion and contraction
startAgaindouble94Restart again after this time
xfloat95Fractional position to expand to - left
yfloat96Fractional position to expand to - upper
𝘅float97Fractional position to expand to - right
𝘆float98Fractional position to expand to - lower

setCenterToCenter(CenterToCenter) returns CenterToCenter in class Svg.Element

Set Center To Center animation for this element

NameTypeLineDescription
animationCenterToCenter104Animation

Class: Svg.Element.CenterToCenter, package: com.appaapps

Animation which expands an element its center is over the centre of the canvas
ReturnsMethodSignatureAttributesLineDescription
CenterToCenter CenterToCenter CenterToCenter protected constructor 132 Clone a center to center animation
CenterToCenter CenterToCenter double, double, double, float, float, float, float protected constructor 117 Create a center to center animation
float active void protected 141 Get fraction of animation
void onActivate void protected 173 Called when this animation becomes active
void scaleDrawArea Canvas protected 162 Apply scale to the drawing area

CenterToCenter(CenterToCenter) returns CenterToCenter in class Svg.Element.CenterToCenter

Clone a center to center animation

NameTypeLineDescription
cloneCenterToCenter133Animation to clone

CenterToCenter(double, double, double, float, float, float, float) returns CenterToCenter in class Svg.Element.CenterToCenter

Create a center to center animation

NameTypeLineDescription
delaydouble118Delay before animation starts in seconds
durationdouble119Duration of animation in seconds
startAgaindouble120Restart after animation after this time
xfloat121Fractional position to expand to - left
yfloat122Fractional position to expand to - upper
𝘅float123Fractional position to expand to - right
𝘆float124Fractional position to expand to - lower

active() returns float in class Svg.Element.CenterToCenter

Get fraction of animation

onActivate() returns void in class Svg.Element.CenterToCenter

Called when this animation becomes active

scaleDrawArea(Canvas) returns void in class Svg.Element.CenterToCenter

Apply scale to the drawing area

NameTypeLineDescription
canvasCanvas163Canvas to which scaling is to be applied

Class: Svg.Element2, package: com.appaapps

Common features of an element drawn with two paints - this is in effect a replacement for ComposeShader which does not seem to work - it always produces a white screen
ReturnsMethodSignatureAttributesLineDescription
Element2 Element2 float, float, float, float private constructor 183 Create en element by specifying its fractional area on the canvas
void drawElement Canvas protected 191 Draw the Svg on the canvas
float height Canvas protected 200 Approximate height of object before scaling
float width Canvas protected 196 Approximate width of object before scaling

Element2(float, float, float, float) returns Element2 in class Svg.Element2

Create en element by specifying its fractional area on the canvas

NameTypeLineDescription
xfloat184Fractional area in which to display the element - left
yfloat185Fractional area in which to display the element - upper
𝘅float186Fractional area in which to display the element - right
𝘆float187Fractional area in which to display the element - lower

drawElement(Canvas) returns void in class Svg.Element2

Draw the Svg on the canvas

NameTypeLineDescription
canvasCanvas192Canvas to draw on

height(Canvas) returns float in class Svg.Element2

Approximate height of object before scaling

NameTypeLineDescription
canvasCanvas201Canvas to draw on

width(Canvas) returns float in class Svg.Element2

Approximate width of object before scaling

NameTypeLineDescription
canvasCanvas197Canvas to draw on

Class: Svg.Image, package: com.appaapps

Draw a bitmap image - move it around to show it all within the space available
ReturnsMethodSignatureAttributesLineDescription
Image Image Bitmap, float, float, float, float private constructor 351 Fraction coordinates of corners of drawing area
void draw void protected 366 Draw a bitmap. Overrides: com.appaapps.Svg.Element2.draw

Image(Bitmap, float, float, float, float) returns Image in class Svg.Image

Fraction coordinates of corners of drawing area

NameTypeLineDescription
bitmapBitmap352Bitmap containing image
xfloat353Fraction coordinates of left edge
yfloat354Fraction coordinates of upper edge
𝘅float355Fraction coordinates of right edge
𝘆float356Fraction coordinates of lower edge

draw() returns void in class Svg.Image

Draw a bitmap. Overrides: com.appaapps.Svg.Element2.draw

Class: Svg.Rectangle, package: com.appaapps

Draw a rectangle
ReturnsMethodSignatureAttributesLineDescription
Rectangle Rectangle float, float, float, float private constructor 208 Create a rectangle
void draw void protected 216 Draw the rectangle. Overrides: com.appaapps.Svg.Element2.draw

Rectangle(float, float, float, float) returns Rectangle in class Svg.Rectangle

Create a rectangle

NameTypeLineDescription
xfloat209Fractional position - left
yfloat210Fractional position - upper
𝘅float211Fractional position - right
𝘆float212Fractional position - lower

draw() returns void in class Svg.Rectangle

Draw the rectangle. Overrides: com.appaapps.Svg.Element2.draw

Class: Svg.Text, package: com.appaapps

Draw text
ReturnsMethodSignatureAttributesLineDescription
Text Text String, float, float, float, float, int, int private constructor 241 Create a text area
void draw void protected 258 Draw the text. Overrides: com.appaapps.Svg.Element2.draw

Text(String, float, float, float, float, int, int) returns Text in class Svg.Text

Create a text area

NameTypeLineDescription
textString242The text to display
xfloat243Fractional area in which to display the text - left
yfloat244Fractional area in which to display the text - upper
𝘅float245Fractional area in which to display the text - right
𝘆float246Fractional area in which to display the text - lower
justifyXint247Justification in x per: com.appaapps.LayoutText
justifyYint248Justification in y per: com.appaapps.LayoutText

draw() returns void in class Svg.Text

Draw the text. Overrides: com.appaapps.Svg.Element2.draw

Class: Unzip, package: com.appaapps

A thread to unzip a file
ReturnsMethodSignatureAttributesLineDescription
ZipFile createZipFile File private 15 Create a file unzipper
Unzip Unzip String public constructor 24 Unzip the named file
void run void public 29 Unzip the named file
void failed void public 55 Report a failure during the unzip
void finished void public 57 Report the unzip as finished
void zipEntry String public abstract 59 Override to process the content of each zip entry

createZipFile(File) returns ZipFile in class Unzip

Create a file unzipper

NameTypeLineDescription
fileFile16File to unzip

Unzip(String) returns Unzip in class Unzip

Unzip the named file

NameTypeLineDescription
FileString25File to unzip

run() returns void in class Unzip

Unzip the named file

failed() returns void in class Unzip

Report a failure during the unzip

finished() returns void in class Unzip

Report the unzip as finished

zipEntry(String) returns void in class Unzip

Override to process the content of each zip entry

NameTypeLineDescription
nameString60Name of zip file entry == file name