APIdia Launch Partner
Top Description Methods
com.badlogic.gdx

public Interface ApplicationListener

Known Direct Implementers
com.badlogic.gdx.Game, com.badlogic.gdx.ApplicationAdapter

An ApplicationListener is called when the Application is created, resumed, rendering, paused or destroyed. All methods are called in a thread that has the OpenGL context current. You can thus safely create and manipulate graphics resources.

The ApplicationListener interface follows the standard Android activity life-cycle and is emulated on the desktop accordingly.

Author
mzechner

Method Summary

Modifier and TypeMethod and Description
public void
create()

Called when the Application is first created.

public void
dispose()

Called when the Application is destroyed.

public void
pause()

Called when the Application is paused, usually when it's not active or visible on-screen.

public void
render()

Called when the Application should render itself.

public void
resize(int
the new width in pixels
width
,
int
the new height in pixels
height
)

Called when the Application is resized.

public void
resume()

Called when the Application is resumed from a paused state, usually when it regains focus.

Method Detail

createback to summary
public void create()

Called when the Application is first created.

disposeback to summary
public void dispose()

Called when the Application is destroyed. Preceded by a call to pause().

pauseback to summary
public void pause()

Called when the Application is paused, usually when it's not active or visible on-screen. An Application is also paused before it is destroyed.

renderback to summary
public void render()

Called when the Application should render itself.

resizeback to summary
public void resize(int width, int height)

Called when the Application is resized. This can happen at any point during a non-paused state but will never happen before a call to create().

Parameters
width:int

the new width in pixels

height:int

the new height in pixels

resumeback to summary
public void resume()

Called when the Application is resumed from a paused state, usually when it regains focus.