public class AndroidMini2DxGame
extends android.app.Activity
| Modifier and Type | Field and Description |
|---|---|
protected ApplicationLogger |
applicationLogger |
protected AndroidMini2DxAudio |
audio |
protected AndroidClipboard |
clipboard |
protected <any> |
executedRunnables |
protected AndroidFiles |
files |
protected boolean |
firstResume |
protected AndroidMini2DxGraphics |
graphics |
android.os.Handler |
handler |
protected boolean |
hideStatusBar |
protected AndroidInput |
input |
protected <any> |
lifecycleListeners |
protected ApplicationListener |
listener |
protected int |
logLevel |
protected AndroidNet |
net |
protected <any> |
runnables |
protected boolean |
useImmersiveMode |
DEFAULT_KEYS_DIALER, DEFAULT_KEYS_DISABLE, DEFAULT_KEYS_SEARCH_GLOBAL, DEFAULT_KEYS_SEARCH_LOCAL, DEFAULT_KEYS_SHORTCUT, FOCUSED_STATE_SET, RESULT_CANCELED, RESULT_FIRST_USER, RESULT_OKACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, APP_OPS_SERVICE, APPWIDGET_SERVICE, AUDIO_SERVICE, BATTERY_SERVICE, BIND_ABOVE_CLIENT, BIND_ADJUST_WITH_ACTIVITY, BIND_ALLOW_OOM_MANAGEMENT, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_IMPORTANT, BIND_NOT_FOREGROUND, BIND_WAIVE_PRIORITY, BLUETOOTH_SERVICE, CAMERA_SERVICE, CAPTIONING_SERVICE, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONSUMER_IR_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DISPLAY_SERVICE, DOWNLOAD_SERVICE, DROPBOX_SERVICE, INPUT_METHOD_SERVICE, INPUT_SERVICE, JOB_SCHEDULER_SERVICE, KEYGUARD_SERVICE, LAUNCHER_APPS_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MEDIA_PROJECTION_SERVICE, MEDIA_ROUTER_SERVICE, MEDIA_SESSION_SERVICE, MODE_APPEND, MODE_ENABLE_WRITE_AHEAD_LOGGING, MODE_MULTI_PROCESS, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NFC_SERVICE, NOTIFICATION_SERVICE, NSD_SERVICE, POWER_SERVICE, PRINT_SERVICE, RESTRICTIONS_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, STORAGE_SERVICE, TELECOM_SERVICE, TELEPHONY_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, TV_INPUT_SERVICE, UI_MODE_SERVICE, USB_SERVICE, USER_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_P2P_SERVICE, WIFI_SERVICE, WINDOW_SERVICE| Constructor and Description |
|---|
AndroidMini2DxGame() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAndroidEventListener(AndroidEventListener listener)
Adds an event listener for Android specific event such as
onActivityResult(...).
|
void |
addLifecycleListener(LifecycleListener listener) |
protected android.widget.FrameLayout.LayoutParams |
createLayoutParams() |
protected void |
createWakeLock(boolean use) |
void |
debug(java.lang.String tag,
java.lang.String message) |
void |
debug(java.lang.String tag,
java.lang.String message,
java.lang.Throwable exception) |
void |
error(java.lang.String tag,
java.lang.String message) |
void |
error(java.lang.String tag,
java.lang.String message,
java.lang.Throwable exception) |
void |
exit() |
ApplicationListener |
getApplicationListener() |
ApplicationLogger |
getApplicationLogger() |
android.view.Window |
getApplicationWindow() |
Audio |
getAudio() |
Clipboard |
getClipboard() |
android.content.Context |
getContext() |
<any> |
getExecutedRunnables() |
Files |
getFiles() |
Graphics |
getGraphics() |
android.os.Handler |
getHandler() |
AndroidInput |
getInput() |
long |
getJavaHeap() |
<any> |
getLifecycleListeners() |
int |
getLogLevel() |
long |
getNativeHeap() |
Net |
getNet() |
Preferences |
getPreferences(java.lang.String name) |
<any> |
getRunnables() |
ApplicationType |
getType() |
int |
getVersion() |
protected void |
hideStatusBar(boolean hide) |
void |
initialize(ApplicationListener listener,
AndroidMini2DxConfig config)
This method has to be called in the
Activity.onCreate(Bundle) method. |
void |
initialize(GameContainer game,
AndroidMini2DxConfig config)
This method has to be called in the
Activity.onCreate(Bundle) method. |
android.view.View |
initializeForView(ApplicationListener listener,
AndroidMini2DxConfig config)
This method has to be called in the
Activity.onCreate(Bundle) method. |
android.view.View |
initializeForView(GameContainer game,
AndroidMini2DxConfig config)
This method has to be called in the
Activity.onCreate(Bundle) method. |
void |
log(java.lang.String tag,
java.lang.String message) |
void |
log(java.lang.String tag,
java.lang.String message,
java.lang.Throwable exception) |
protected void |
onActivityResult(int requestCode,
int resultCode,
android.content.Intent data) |
void |
onConfigurationChanged(android.content.res.Configuration config) |
protected void |
onDestroy() |
protected void |
onPause() |
protected void |
onResume() |
void |
onWindowFocusChanged(boolean hasFocus) |
void |
postRunnable(java.lang.Runnable runnable) |
void |
removeAndroidEventListener(AndroidEventListener listener)
Removes an event listener for Android specific event such as
onActivityResult(...).
|
void |
removeLifecycleListener(LifecycleListener listener) |
void |
setApplicationLogger(ApplicationLogger applicationLogger) |
void |
setLogLevel(int logLevel) |
void |
useImmersiveMode(boolean use) |
addContentView, closeContextMenu, closeOptionsMenu, createPendingResult, dismissDialog, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, dump, findViewById, finish, finishActivity, finishActivityFromChild, finishAffinity, finishAfterTransition, finishAndRemoveTask, finishFromChild, getActionBar, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getContentScene, getContentTransitionManager, getCurrentFocus, getFragmentManager, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLoaderManager, getLocalClassName, getMediaController, getMenuInflater, getParent, getParentActivityIntent, getPreferences, getRequestedOrientation, getSystemService, getTaskId, getTitle, getTitleColor, getVolumeControlStream, getWindow, getWindowManager, hasWindowFocus, invalidateOptionsMenu, isChangingConfigurations, isChild, isDestroyed, isFinishing, isImmersive, isTaskRoot, managedQuery, moveTaskToBack, navigateUpTo, navigateUpToFromChild, onActionModeFinished, onActionModeStarted, onActivityReenter, onApplyThemeResource, onAttachedToWindow, onAttachFragment, onBackPressed, onChildTitleChanged, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreate, onCreate, onCreateContextMenu, onCreateDescription, onCreateDialog, onCreateDialog, onCreateNavigateUpTaskStack, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onCreateThumbnail, onCreateView, onCreateView, onDetachedFromWindow, onEnterAnimationComplete, onGenericMotionEvent, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onLowMemory, onMenuItemSelected, onMenuOpened, onNavigateUp, onNavigateUpFromChild, onNewIntent, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPostCreate, onPostCreate, onPostResume, onPrepareDialog, onPrepareDialog, onPrepareNavigateUpTaskStack, onPrepareOptionsMenu, onPreparePanel, onProvideAssistData, onRestart, onRestoreInstanceState, onRestoreInstanceState, onRetainNonConfigurationInstance, onSaveInstanceState, onSaveInstanceState, onSearchRequested, onStart, onStop, onTitleChanged, onTouchEvent, onTrackballEvent, onTrimMemory, onUserInteraction, onUserLeaveHint, onVisibleBehindCanceled, onWindowAttributesChanged, onWindowStartingActionMode, openContextMenu, openOptionsMenu, overridePendingTransition, postponeEnterTransition, recreate, registerForContextMenu, releaseInstance, removeDialog, reportFullyDrawn, requestVisibleBehind, requestWindowFeature, runOnUiThread, setActionBar, setContentTransitionManager, setContentView, setContentView, setContentView, setDefaultKeyMode, setEnterSharedElementCallback, setExitSharedElementCallback, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setFinishOnTouchOutside, setImmersive, setIntent, setMediaController, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setTaskDescription, setTitle, setTitle, setTitleColor, setVisible, setVolumeControlStream, shouldUpRecreateTask, showDialog, showDialog, startActionMode, startActivities, startActivities, startActivity, startActivity, startActivityForResult, startActivityForResult, startActivityFromChild, startActivityFromChild, startActivityFromFragment, startActivityFromFragment, startActivityIfNeeded, startActivityIfNeeded, startIntentSender, startIntentSender, startIntentSenderForResult, startIntentSenderForResult, startIntentSenderFromChild, startIntentSenderFromChild, startLockTask, startManagingCursor, startNextMatchingActivity, startNextMatchingActivity, startPostponedEnterTransition, startSearch, stopLockTask, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterForContextMenuapplyOverrideConfiguration, attachBaseContext, getResources, getTheme, setThemebindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkUriPermission, checkUriPermission, clearWallpaper, createConfigurationContext, createDisplayContext, createPackageContext, databaseList, deleteDatabase, deleteFile, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAssets, getBaseContext, getCacheDir, getClassLoader, getCodeCacheDir, getContentResolver, getDatabasePath, getDir, getExternalCacheDir, getExternalCacheDirs, getExternalFilesDir, getExternalFilesDirs, getExternalMediaDirs, getFilesDir, getFileStreamPath, getMainLooper, getNoBackupFilesDir, getObbDir, getObbDirs, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getSharedPreferences, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isRestricted, openFileInput, openFileOutput, openOrCreateDatabase, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeUriPermission, sendBroadcast, sendBroadcast, sendBroadcastAsUser, sendBroadcastAsUser, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, setWallpaper, setWallpaper, startInstrumentation, startService, stopService, unbindService, unregisterReceiverprotected AndroidMini2DxGraphics graphics
protected AndroidInput input
protected AndroidMini2DxAudio audio
protected AndroidFiles files
protected AndroidNet net
protected AndroidClipboard clipboard
protected ApplicationListener listener
public android.os.Handler handler
protected boolean firstResume
protected final <any> runnables
protected final <any> executedRunnables
protected final <any> lifecycleListeners
protected int logLevel
protected ApplicationLogger applicationLogger
protected boolean useImmersiveMode
protected boolean hideStatusBar
public void initialize(GameContainer game,
AndroidMini2DxConfig config)
Activity.onCreate(Bundle) method.
It sets up all the things necessary to get input, render via OpenGL and so
on. You can configure other aspects of the application with the rest of the
fields in the AndroidMini2DxConfig instance.game - the GameContainer implementing the game logicconfig - the AndroidMini2DxConfig, defining various settings of the
application (use accelerometer, etc.).public void initialize(ApplicationListener listener,
AndroidMini2DxConfig config)
Activity.onCreate(Bundle) method.
It sets up all the things necessary to get input, render via OpenGL and so
on. You can configure other aspects of the application with the rest of the
fields in the AndroidMini2DxConfig instance.listener - the ApplicationListener implementing the program logicconfig - the AndroidMini2DxConfig, defining various settings of the
application (use accelerometer, etc.).public android.view.View initializeForView(GameContainer game,
AndroidMini2DxConfig config)
Activity.onCreate(Bundle) method.
It sets up all the things necessary to get input, render via OpenGL and so
on. Uses a default AndroidApplicationConfiguration.
Note: you have to add the returned view to your layout!
game - the GameContainer implementing the game logicconfig - the AndroidMini2DxConfig, defining various settings of the
application (use accelerometer, etc.).public android.view.View initializeForView(ApplicationListener listener,
AndroidMini2DxConfig config)
Activity.onCreate(Bundle) method.
It sets up all the things necessary to get input, render via OpenGL and so
on. You can configure other aspects of the application with the rest of the
fields in the AndroidApplicationConfiguration instance.
Note: you have to add the returned view to your layout!
listener - the ApplicationListener implementing the program logicconfig - the AndroidApplicationConfiguration, defining various
settings of the application (use accelerometer, etc.).protected android.widget.FrameLayout.LayoutParams createLayoutParams()
protected void createWakeLock(boolean use)
protected void hideStatusBar(boolean hide)
public void onWindowFocusChanged(boolean hasFocus)
onWindowFocusChanged in interface android.view.Window.CallbackonWindowFocusChanged in class android.app.Activitypublic void useImmersiveMode(boolean use)
protected void onPause()
onPause in class android.app.Activityprotected void onResume()
onResume in class android.app.Activityprotected void onDestroy()
onDestroy in class android.app.Activitypublic ApplicationListener getApplicationListener()
public Audio getAudio()
public Files getFiles()
public Graphics getGraphics()
public AndroidInput getInput()
public Net getNet()
public ApplicationType getType()
public int getVersion()
public long getJavaHeap()
public long getNativeHeap()
public Preferences getPreferences(java.lang.String name)
public Clipboard getClipboard()
public void postRunnable(java.lang.Runnable runnable)
public void onConfigurationChanged(android.content.res.Configuration config)
onConfigurationChanged in interface android.content.ComponentCallbacksonConfigurationChanged in class android.app.Activitypublic void exit()
public void debug(java.lang.String tag,
java.lang.String message)
public void debug(java.lang.String tag,
java.lang.String message,
java.lang.Throwable exception)
public void log(java.lang.String tag,
java.lang.String message)
public void log(java.lang.String tag,
java.lang.String message,
java.lang.Throwable exception)
public void error(java.lang.String tag,
java.lang.String message)
public void error(java.lang.String tag,
java.lang.String message,
java.lang.Throwable exception)
public void setLogLevel(int logLevel)
public int getLogLevel()
public void setApplicationLogger(ApplicationLogger applicationLogger)
public ApplicationLogger getApplicationLogger()
public void addLifecycleListener(LifecycleListener listener)
public void removeLifecycleListener(LifecycleListener listener)
protected void onActivityResult(int requestCode,
int resultCode,
android.content.Intent data)
onActivityResult in class android.app.Activitypublic void addAndroidEventListener(AndroidEventListener listener)
public void removeAndroidEventListener(AndroidEventListener listener)
public android.content.Context getContext()
public <any> getRunnables()
public <any> getExecutedRunnables()
public <any> getLifecycleListeners()
public android.view.Window getApplicationWindow()
public android.os.Handler getHandler()