Package com.badlogic.gdx
Interface ApplicationListener
-
- All Known Implementing Classes:
ApplicationAdapter,Game
public interface ApplicationListenerAn
ApplicationListeneris called when theApplicationis 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
ApplicationListenerinterface follows the standard Android activity life-cycle and is emulated on the desktop accordingly.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcreate()Called when theApplicationis first created.voiddispose()Called when theApplicationis destroyed.voidpause()Called when theApplicationis paused, usually when it's not active or visible on-screen.voidrender()Called when theApplicationshould render itself.voidresize(int width, int height)Called when theApplicationis resized.voidresume()Called when theApplicationis resumed from a paused state, usually when it regains focus.
-
-
-
Method Detail
-
create
void create()
Called when theApplicationis first created.
-
resize
void resize(int width, int height)Called when theApplicationis resized. This can happen at any point during a non-paused state but will never happen before a call tocreate().- Parameters:
width- the new width in pixelsheight- the new height in pixels
-
render
void render()
Called when theApplicationshould render itself.
-
pause
void pause()
Called when theApplicationis paused, usually when it's not active or visible on-screen. An Application is also paused before it is destroyed.
-
resume
void resume()
Called when theApplicationis resumed from a paused state, usually when it regains focus.
-
dispose
void dispose()
Called when theApplicationis destroyed. Preceded by a call topause().
-
-