Skip to content

Commit

Permalink
Docs : Replaced & with and some code reformating
Browse files Browse the repository at this point in the history
  • Loading branch information
pavly-gerges committed Apr 17, 2022
1 parent a875b7c commit d07a6fb
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
16 changes: 8 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
*.iml
.gradle
/build
/captures
/.git
/.idea
/.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
local.properties
*.iml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
.idea
/.git
.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ protected void onCreate(Bundle savedInstanceState) {
webSettings.setSupportZoom(true);
webSettings.setDisplayZoomControls(true);
webView.loadUrl("https://jmonkeyengine.org/");
/*an image & clickListener for demonstration*/
/*an image and clickListener for demonstration*/
findViewById(R.id.image).setOnClickListener((view) -> MainActivity.this.runOnUiThread(() -> Toast.makeText(MainActivity.this, "Hi Jme From UI !", LENGTH_LONG).show()));
}

Expand All @@ -90,7 +90,7 @@ public void onExceptionThrown(Throwable e) {
@Override
public void onRenderCompletion(LegacyApplication application, AppSettings appSettings) {
Toast.makeText(MainActivity.this, "User's Delay Finished w/o errors !" + application.getContext() + " " + appSettings.getFrameRate(), Toast.LENGTH_SHORT).show();
/*animate & remove the splashScreen UI Component*/
/*animate and remove the splashScreen UI Component*/
splashScreen.animate().scaleY(0).scaleX(0).setDuration(500).withEndAction(() -> {
/*set the other android views to be visible*/
findViewById(R.id.webView).setVisibility(View.VISIBLE);
Expand All @@ -109,7 +109,7 @@ public void onRenderCompletion(LegacyApplication application, AppSettings appSet
public void onWindowFocusChanged(boolean hasFocus) {
/*get the view from the current activity*/
final View decorView = MainActivity.this.getWindow().getDecorView();
/*hide navigation bar, apply fullscreen, hide status bar, immersive sticky to disable the system bars(nav & status) from showing up when user wipes the screen*/
/*hide navigation bar, apply fullscreen, hide status bar, immersive sticky to disable the system bars(nav and status) from showing up when user wipes the screen*/
decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ protected void onCreate(Bundle savedInstanceState) {
/*get the fragment support manager of this activity context*/
final FragmentManager fragmentManager = getFragmentManager();
final FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
/*replace the previous fragment w/ the new one & commit the change*/
fragmentTransaction.replace(R.id.jmeContainer, new FullscreenFragment()).commit();

/*replace the previous fragment w/ the new one and commit the change*/
fragmentTransaction.replace(R.id.jmeContainer, new FullscreenFragment())
.commit();
}

/**
Expand All @@ -37,7 +39,7 @@ protected void onCreate(Bundle savedInstanceState) {
public void onWindowFocusChanged(boolean hasFocus) {
/*get the view from the current activity*/
final View decorView = MainActivity.this.getWindow().getDecorView();
/*hide navigation bar, apply fullscreen, hide status bar, immersive sticky to disable the system bars(nav & status) from showing up when user wipes the screen*/
/*hide navigation bar, apply fullscreen, hide status bar, immersive sticky to disable the system bars(nav and status) from showing up when user wipes the screen*/
decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* An Android Example that demonstrates : How to use a simple game#{@link MyGame}
* on #{@link com.jme3.app.jmeSurfaceView.JmeSurfaceView} inside an #{@link androidx.appcompat.app.AppCompatActivity}.
* <br>
* <b>Note : use #{@link AppCompatActivity#setRequestedOrientation(int)} & #{@link ActivityInfo#SCREEN_ORIENTATION_LANDSCAPE} for LandScape mode or specify that under the <activity> activity tag xml.</b>
* <b>Note : use #{@link AppCompatActivity#setRequestedOrientation(int)} and #{@link ActivityInfo#SCREEN_ORIENTATION_LANDSCAPE} for LandScape mode or specify that under the <activity> activity tag xml.</b>
*
* @author pavl_g
*/
Expand All @@ -39,7 +39,7 @@ protected void onCreate(Bundle savedInstanceState) {
jmeSurfaceView.setOnExceptionThrown(this);
jmeSurfaceView.setOnRendererCompleted(this);
/*start the game*/
jmeSurfaceView.startRenderer(JmeSurfaceView.NO_DELAY);
jmeSurfaceView.startRenderer(0);
}

/**
Expand Down Expand Up @@ -72,7 +72,7 @@ public void onRenderCompletion(LegacyApplication application, AppSettings appSet
public void onWindowFocusChanged(boolean hasFocus) {
/*get the view from the current activity*/
final View decorView = MainActivity.this.getWindow().getDecorView();
/*hide navigation bar, apply fullscreen, hide status bar, immersive sticky to disable the system bars(nav & status) from showing up when user wipes the screen*/
/*hide navigation bar, apply fullscreen, hide status bar, immersive sticky to disable the system bars(nav and status) from showing up when user wipes the screen*/
decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
Expand Down

0 comments on commit d07a6fb

Please sign in to comment.