public class Lifecycle extends Object
Constructor and Description |
---|
Lifecycle() |
Modifier and Type | Method and Description |
---|---|
protected void |
bindCrashProtection()
Callback that can be overriden to disable or modify crash protection
|
void |
destroy()
Callback when the app is destroyed
|
protected Form |
getCurrentForm()
The current form within the application lifecycle which possibly differs from the one in the implementation
|
protected int |
getNetworkThreadCount()
Returns the default number of network thread count
|
Resources |
getTheme()
The theme instance
|
protected String |
getThemeName()
Returns the name of the global theme file, by default it's "/theme".
|
protected void |
handleNetworkError(NetworkEvent err)
Invoked on a network error callback
|
void |
init(Object context)
Invoked when the app is "cold launched", this acts like a constructor
|
void |
runApp()
This method is invoked by start to show the first form of the application
|
protected void |
setCurrentForm(Form current)
The current form within the application lifecycle which possibly differs from the one in the implementation
|
void |
start()
Default start callback that's invoked on application resume
|
void |
stop()
Callback when the app is suspended
|
public void init(Object context)
context
- some OSs might pass a native object representing platform internal informationprotected void bindCrashProtection()
protected int getNetworkThreadCount()
protected String getThemeName()
public Resources getTheme()
protected void handleNetworkError(NetworkEvent err)
err
- the network error eventpublic void start()
public void runApp()
public void stop()
public void destroy()
protected Form getCurrentForm()
protected void setCurrentForm(Form current)
current
- the new current Form