public class AndroidHarnessFragment
extends android.app.Fragment
implements com.jme3.input.controls.TouchListener, android.content.DialogInterface.OnClickListener, android.view.View.OnLayoutChangeListener, com.jme3.system.SystemListener
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
appClass
The application class to start
|
protected java.lang.String |
audioRendererType
Sets the type of Audio Renderer to be used.
|
protected int |
eglAlphaBits
Sets the desired number of Alpha bits for the surfaceview.
|
protected int |
eglBitsPerPixel
Sets the desired RGB size for the surfaceview.
|
protected int |
eglDepthBits
The number of depth bits specifies the precision of the depth buffer.
|
protected int |
eglSamples
Sets the number of samples to use for multisampling.
Leave 0 (default) to disable multisampling.
Set to 2 or 4 to enable multisampling.
|
protected int |
eglStencilBits
Set the number of stencil bits.
|
protected java.lang.String |
exitDialogMessage
Message of the exit dialog, default is "Use your home key to bring this
app into the background or exit to terminate it."
|
protected java.lang.String |
exitDialogTitle
Title of the exit dialog, default is "Do you want to exit?"
|
protected boolean |
finishOnAppStop
if true finish this activity when the jme app is stopped
|
protected android.widget.FrameLayout |
frameLayout |
protected int |
frameRate
Set the desired frame rate.
|
protected boolean |
handleExitHook
set to false if you don't want the harness to handle the exit hook
|
protected boolean |
joystickEventsEnabled
If true Android Sensors are used as simulated Joysticks.
|
protected boolean |
keyEventsEnabled
If true KeyEvents are generated from TouchEvents
|
protected int |
maxResolutionDimension
Set the maximum resolution for the surfaceview in either the
width or height screen direction depending on the screen size.
|
protected boolean |
mouseEventsEnabled
If true MouseEvents are generated from TouchEvents
|
protected boolean |
mouseEventsInvertX
Flip X axis
|
protected boolean |
mouseEventsInvertY
Flip Y axis
|
protected android.widget.ImageView |
splashImageView |
protected int |
splashPicID
Splash Screen picture Resource ID.
|
protected android.opengl.GLSurfaceView |
view |
| Constructor and Description |
|---|
AndroidHarnessFragment() |
| Modifier and Type | Method and Description |
|---|---|
void |
createLayout() |
void |
destroy() |
void |
gainFocus() |
com.jme3.app.Application |
getJmeApplication() |
void |
handleError(java.lang.String errorMsg,
java.lang.Throwable t)
Called when an error has occurred.
|
void |
initialize() |
protected void |
initializeLogHandler()
Removes the standard Android log handler due to an issue with not logging
entries lower than INFO level and adds a handler that produces
JME formatted log messages.
|
void |
loseFocus() |
void |
onActivityCreated(android.os.Bundle savedInstanceState) |
void |
onAttach(android.app.Activity activity) |
void |
onClick(android.content.DialogInterface dialog,
int whichButton)
Called by the android alert dialog, terminate the activity and OpenGL
rendering
|
void |
onCreate(android.os.Bundle savedInstanceState)
This Fragment uses setRetainInstance(true) so the onCreate method will only
be called once.
|
android.view.View |
onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState)
Called by the system to create the View hierchy associated with this
Fragment.
|
void |
onDestroy()
Called by the system when the application is being destroyed.
|
void |
onDestroyView()
Called by the Android system each time the Activity is destroyed or recreated.
|
void |
onDetach() |
void |
onLayoutChange(android.view.View v,
int left,
int top,
int right,
int bottom,
int oldLeft,
int oldTop,
int oldRight,
int oldBottom) |
void |
onPause()
When the Fragment pauses (ie.
|
void |
onResume()
When the Fragment resumes (ie.
|
void |
onStart() |
void |
onStop() |
void |
onTouch(java.lang.String name,
com.jme3.input.event.TouchEvent evt,
float tpf)
Gets called by the InputManager on all touch/drag/scale events
|
void |
removeSplashScreen() |
void |
requestClose(boolean esc) |
void |
reshape(int width,
int height) |
void |
update() |
dump, equals, getActivity, getArguments, getChildFragmentManager, getFragmentManager, getId, getLoaderManager, getParentFragment, getResources, getRetainInstance, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isRemoving, isResumed, isVisible, onActivityResult, onConfigurationChanged, onContextItemSelected, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onOptionsItemSelected, onOptionsMenuClosed, onPrepareOptionsMenu, onSaveInstanceState, onTrimMemory, onViewCreated, onViewStateRestored, registerForContextMenu, setArguments, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setRetainInstance, setTargetFragment, setUserVisibleHint, startActivity, startActivity, startActivityForResult, startActivityForResult, toString, unregisterForContextMenuprotected java.lang.String appClass
protected int eglBitsPerPixel
protected int eglAlphaBits
protected int eglDepthBits
protected int eglSamples
protected int eglStencilBits
protected int frameRate
protected int maxResolutionDimension
protected java.lang.String audioRendererType
Android MediaPlayer / SoundPool can be used on all
supported Android platform versions (2.2+)
OpenAL Soft uses an OpenSL backend and is only supported on Android
versions 2.3+.
Only use ANDROID_ static strings found in AppSettings
protected boolean joystickEventsEnabled
protected boolean keyEventsEnabled
protected boolean mouseEventsEnabled
protected boolean mouseEventsInvertX
protected boolean mouseEventsInvertY
protected boolean finishOnAppStop
protected boolean handleExitHook
protected java.lang.String exitDialogTitle
protected java.lang.String exitDialogMessage
protected int splashPicID
protected android.widget.FrameLayout frameLayout
protected android.opengl.GLSurfaceView view
protected android.widget.ImageView splashImageView
public com.jme3.app.Application getJmeApplication()
public void onAttach(android.app.Activity activity)
onAttach in class android.app.Fragmentpublic void onCreate(android.os.Bundle savedInstanceState)
onCreate in class android.app.FragmentsavedInstanceState - public android.view.View onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState)
onCreateView in class android.app.Fragmentinflater - container - savedInstanceState - public void onActivityCreated(android.os.Bundle savedInstanceState)
onActivityCreated in class android.app.Fragmentpublic void onStart()
onStart in class android.app.Fragmentpublic void onResume()
onResume in class android.app.Fragmentpublic void onPause()
onPause in class android.app.Fragmentpublic void onStop()
onStop in class android.app.Fragmentpublic void onDestroyView()
onDestroyView in class android.app.Fragmentpublic void onDestroy()
onDestroy in class android.app.Fragmentpublic void onDetach()
onDetach in class android.app.Fragmentpublic void handleError(java.lang.String errorMsg,
java.lang.Throwable t)
handleError in interface com.jme3.system.SystemListenerpublic void onClick(android.content.DialogInterface dialog,
int whichButton)
onClick in interface android.content.DialogInterface.OnClickListenerdialog - whichButton - public void onTouch(java.lang.String name,
com.jme3.input.event.TouchEvent evt,
float tpf)
onTouch in interface com.jme3.input.controls.TouchListenerpublic void createLayout()
public void removeSplashScreen()
protected void initializeLogHandler()
public void initialize()
initialize in interface com.jme3.system.SystemListenerpublic void reshape(int width,
int height)
reshape in interface com.jme3.system.SystemListenerpublic void update()
update in interface com.jme3.system.SystemListenerpublic void requestClose(boolean esc)
requestClose in interface com.jme3.system.SystemListenerpublic void destroy()
destroy in interface com.jme3.system.SystemListenerpublic void gainFocus()
gainFocus in interface com.jme3.system.SystemListenerpublic void loseFocus()
loseFocus in interface com.jme3.system.SystemListenerpublic void onLayoutChange(android.view.View v,
int left,
int top,
int right,
int bottom,
int oldLeft,
int oldTop,
int oldRight,
int oldBottom)
onLayoutChange in interface android.view.View.OnLayoutChangeListener