List of usage examples for com.badlogic.gdx.backends.android AndroidApplicationConfiguration AndroidApplicationConfiguration
AndroidApplicationConfiguration
From source file:com.mbrlabs.demo.AndroidLauncher.java
License:Apache License
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); AndroidApplicationConfiguration config = new AndroidApplicationConfiguration(); initialize(new MundusDemo(), config); }
From source file:com.mknsri.drunktoss.MainActivity.java
License:Open Source License
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); AndroidApplicationConfiguration cfg = new AndroidApplicationConfiguration(); //cfg.useGL20 = true; cfg.useAccelerometer = false;//from w w w.j a v a 2 s . co m cfg.useCompass = false; requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); RelativeLayout layout = new RelativeLayout(this); RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams( RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT); layout.setLayoutParams(params); gameView = createGameView(cfg); layout.addView(gameView); setContentView(layout); }
From source file:com.mobidevelop.maps.editor.MainActivity.java
License:Apache License
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); AndroidApplicationConfiguration cfg = new AndroidApplicationConfiguration(); cfg.useGL20 = true;/*from w ww .j a v a 2 s. c o m*/ initialize(new MapEditor(), cfg); }
From source file:com.nowhereinc.joyshapes.MainActivity.java
License:Apache License
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); AndroidApplicationConfiguration cfg = new AndroidApplicationConfiguration(); cfg.useGL20 = true;/*from w w w . j a va2s .c o m*/ initialize(new JoyShapesMain(), cfg); }
From source file:com.redthirddivision.astilade.android.AndroidLauncher.java
License:Apache License
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); AndroidApplicationConfiguration config = new AndroidApplicationConfiguration(); config.useAccelerometer = false;/* w ww .j a v a 2 s . co m*/ config.useCompass = false; initialize(new Astilade(), config); }
From source file:com.sadafnoor.accelerometerInputProcessorTests.AcclerometerInputProcessorAndroid.java
License:Apache License
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); AndroidApplicationConfiguration cfg = new AndroidApplicationConfiguration(); cfg.useGL20 = true;//from ww w.java2 s .co m initialize(new AccelerometerInputProcessorTestGame() , cfg); }
From source file:com.sandeel.bushidoblocks.MainActivity.java
License:Open Source License
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Swarm.setActive(this); Swarm.init(this, ID, "KEY"); AndroidApplicationConfiguration cfg = new AndroidApplicationConfiguration(); cfg.useGL20 = true;/*from w w w .j ava2s .c om*/ cfg.useAccelerometer = false; cfg.useCompass = false; super.onCreate(savedInstanceState); // Create the layout RelativeLayout layout = new RelativeLayout(this); // Do the stuff that initialize() would do for you requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); // Create the libgdx View View gameView = initializeForView( new BushidoBlocks(new AndroidLeaderboard(), new ActionResolverAndroid(this)), cfg); // Create and setup the AdMob view AdView adView = new AdView(this, AdSize.BANNER, "KEY"); // Put in your secret key here adView.loadAd(new AdRequest()); // Add the libgdx view layout.addView(gameView); // Add the AdMob view RelativeLayout.LayoutParams adParams = new RelativeLayout.LayoutParams( RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT); adParams.addRule(RelativeLayout.ALIGN_PARENT_TOP); adParams.addRule(RelativeLayout.CENTER_HORIZONTAL); layout.addView(adView, adParams); // Hook it all up setContentView(layout); }
From source file:com.sawan.mathattack.android.AndroidLauncher.java
License:Open Source License
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); AndroidApplicationConfiguration config = new AndroidApplicationConfiguration(); initialize(new MainStarter(), config); }
From source file:com.softwaresemantics.diyglsllwp.LiveWallpaperService.java
License:Creative Commons License
public void onCreateApplication() { super.onCreateApplication(); LiveWallpaperService.instance = this; config = new AndroidApplicationConfiguration(); config.useGL20 = true;//w ww. j a va 2s . co m config.depth = 16; config.maxSimultaneousSounds = 0; config.numSamples = 0; config.useAccelerometer = false; config.useCompass = false; config.useWakelock = false; config.stencil = 0; PreferenceManager.setDefaultValues(this, R.xml.prefs, false); prefs = new LiveWallpaperPrefs(this); reloadShader(); initGDX(); prefs.registerOnSharedPreferenceChangeListener(this); // TODO Add preference for LWP process priority // Try to to keep the UI fluid android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_BACKGROUND); }
From source file:com.softwaresemantics.diyglsllwp.LiveWallpaperService.java
License:Creative Commons License
protected void initGDX() { if (galleryAppInstance != null) { // Second activity (ie Livewallpaper is active and running) // dispose ressources // Toast.makeText(this, "switch gallery -> LWP", Toast.LENGTH_LONG) // .show(); galleryAppInstance.mySurface.dispose(); galleryAppInstance.getGraphics().clearManagedCaches(); // galleryAppInstance.destroyGraphics(); // Change lifecycle to recreate surface on resume // if (getGraphicsView() instanceof GLSurfaceViewCupcake) // ((GLSurfaceViewCupcake) getGraphicsView()).onPause(); // if (getGraphicsView() instanceof android.opengl.GLSurfaceView) // ((android.opengl.GLSurfaceView) getGraphicsView()).onPause(); // Maybe we should wait and dot the rest of the init in the first // render call.. ?? }//from w ww . ja v a 2s .c o m // Log.d("lwp", "initGDX"); // if (listener != null) { // Log.d("lwp", "listener dispose"); // listener.dispose(); // } if (shaderGLSL != null) { Log.d("lwp", "new DIYGslSurface"); lwpSurface = new DIYGslSurface(shaderGLSL, prefs.isReductionFactorEnabled(), prefs.getReductionFactor(), prefs.isTouchEnabled(), prefs.isDisplayFPSLWP(), prefs.isTimeDithering(), prefs.getTimeDitheringFactor(), prefs.getTimeLoopPeriod() != null, prefs.getTimeLoopPeriod() != null ? prefs.getTimeLoopPeriod() : 60, prefs.isForceMediumP(), prefs.getSpeedFactor()); } else { // built in default shader Log.d("lwp", "new DIYGslSurface default"); lwpSurface = new DIYGslSurface(); } lwpSurface.setNativeCallback(this); config = new AndroidApplicationConfiguration(); config.useGL20 = true; Log.d("lwp", "initGDX LWP initialize"); initialize(lwpSurface, config); }