Android Open Source - libgdx-sample Main Activity






From Project

Back to project page libgdx-sample.

License

The source code is released under:

GNU Lesser General Public License

If you think the Android project libgdx-sample listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package ch.epfl.chili.libgdx_sample.android;
//w w w .ja  v a2s.com
import android.os.Bundle;
import ch.epfl.chili.libgdx_sample.LibgdxSample;
import ch.epfl.chili.libgdx_sample.DeviceCameraController;
import ch.epfl.chili.libgdx_sample.PlatformDependentMethods;

import com.badlogic.gdx.backends.android.AndroidApplication;
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;

/**
 * The entry point object that runs the application on Android
 * @author Ayberk zgr
 */
public class MainActivity extends AndroidApplication {
  
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
  
        AndroidApplicationConfiguration cfg = new AndroidApplicationConfiguration();
        cfg.a = 8;
        cfg.b = 8;
        cfg.g = 8;
        cfg.r = 8;
        
        PlatformDependentMethods platformDeps = new AndroidDependentMethods(getApplicationContext());
        DeviceCameraController cameraControl = new AndroidCameraController();
        initialize(new LibgdxSample(platformDeps, cameraControl), cfg);
        
        graphics.getView().setKeepScreenOn(true);
    }
}




Java Source Code List

ch.epfl.chili.libgdx_sample.DeviceCameraController.java
ch.epfl.chili.libgdx_sample.IOSLauncher.java
ch.epfl.chili.libgdx_sample.LibgdxSample.java
ch.epfl.chili.libgdx_sample.PlatformDependentMethods.java
ch.epfl.chili.libgdx_sample.android.AndroidCameraController.java
ch.epfl.chili.libgdx_sample.android.AndroidDependentMethods.java
ch.epfl.chili.libgdx_sample.android.MainActivity.java
ch.epfl.chili.libgdx_sample.client.HtmlLauncher.java
ch.epfl.chili.libgdx_sample.desktop.DesktopCameraController.java
ch.epfl.chili.libgdx_sample.desktop.DesktopDependentMethods.java
ch.epfl.chili.libgdx_sample.desktop.Main.java
ch.epfl.chili.libgdx_sample.util.Size2D.java