|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectandroid.gameengine.icadroids.forms.GameForm
public class GameForm
With GameForm you can create (and delete) views on top of the current view. Always create a GameForm inside a triggerAlarm! Else the GameForm will not be shown! When you show a view, the GameView will still be running! You must pause this view by yourself. The layout of the views are made in a android XML layout file. You can use the UI builder from android to make one. Layouts are saved in the /res/layout folder. To receive touch inputs, you must implement the IFormInput interface.
Constructor Summary | |
---|---|
GameForm(GameEngine gameEngine)
Make a GameForm without adding a new layout. |
|
GameForm(java.lang.String layoutName,
IFormInput IformInput,
GameEngine gameEngine)
Make a GameForm and show immediately the given Layout |
Method Summary | |
---|---|
View |
findViewElementByName(java.lang.String idName)
Get the view of a elementname |
java.lang.String |
getElementName(View viewElement)
Get the ID name of an view element, like a button or textbox. |
java.lang.String |
getTextFromTextfield(java.lang.String textfieldName)
Get text from a textfield. |
void |
removeView(java.lang.String layoutName)
Remove the specified view from the screen. |
void |
sendToast(java.lang.String text,
int duration)
Toast are little grey boxes with text in it that appear a few seconds on the screen. |
void |
showView(java.lang.String layoutName,
IFormInput IformInput)
Add a new view (layout) on the top of the current view. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GameForm(java.lang.String layoutName, IFormInput IformInput, GameEngine gameEngine)
layoutName
- The layout name given in the res/layout folder. Give the
name without .XML extension! . So if your layout is
called 'main.xml', this parameter should be "main" .IformInput
- The IFormInput object that will receive touch inputs of this
layoutgameEngine
- The GameEngine which this game is currently running on.public GameForm(GameEngine gameEngine)
gameEngine
- The GameEngine which the game is currently running onMethod Detail |
---|
public void showView(java.lang.String layoutName, IFormInput IformInput)
layoutName
- The layout name given in the res/layout folder. Give the
name without .XML extension! . So if your layout is
called 'main.xml', this parameter should be "main" .IformInput
- The IFormInput object that will receive touch inputs of this
layoutpublic java.lang.String getElementName(View viewElement)
viewElement
-
public void sendToast(java.lang.String text, int duration)
text
- The text that will be visible in the toastduration
- The duration of the toast in secondspublic java.lang.String getTextFromTextfield(java.lang.String textfieldName)
textfieldName
- The android:id name of the textfield specified in your android
layout xml file
public void removeView(java.lang.String layoutName)
layoutName
- The layout name given in the res/layout folder. Give the
name without .XML extension! . So if your layout is
called 'main.xml', this parameter should be "main" .public View findViewElementByName(java.lang.String idName)
idName
- the id name of the view
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |