当前位置: 首页>>代码示例>>Java>>正文


Java AndroidApplicationConfiguration类代码示例

本文整理汇总了Java中com.badlogic.gdx.backends.android.AndroidApplicationConfiguration的典型用法代码示例。如果您正苦于以下问题:Java AndroidApplicationConfiguration类的具体用法?Java AndroidApplicationConfiguration怎么用?Java AndroidApplicationConfiguration使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


AndroidApplicationConfiguration类属于com.badlogic.gdx.backends.android包,在下文中一共展示了AndroidApplicationConfiguration类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    gameHelper = new GameHelper(this, GameHelper.CLIENT_GAMES);

    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    config.hideStatusBar = true;
    config.useAccelerometer = true;

    gameHelper.setup(this);

    playServices = new PlayServices(this, gameHelper);

    initialize(new Armadillo(playServices), config);
}
 
开发者ID:AndreFCruz,项目名称:feup-lpoo-armadillo,代码行数:20,代码来源:AndroidLauncher.java

示例2: onCreate

import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (LeakCanary.isInAnalyzerProcess(this)) {
        // This process is dedicated to LeakCanary for heap analysis.
        // You should not init your app in this process.
        return;
    }
    LeakCanary.install(this.getApplication());
    playService = new AndroidNetworkService(this);
    no.ntnu.tdt4240.asteroids.service.ISettingsService settingsService = new AndroidSettingsService(this.getApplicationContext());
    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    config.useCompass = false;
    config.useAccelerometer = false;
    config.useImmersiveMode = true;
    config.useWakelock = true;
    initialize(new Asteroids(playService, settingsService), config);
    playService.setup();
}
 
开发者ID:ezet,项目名称:penguins-in-space,代码行数:20,代码来源:AndroidLauncher.java

示例3: onCreate

import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Initialize the Mobile Ads SDK.
    MobileAds.initialize(this, APP_ID);

    AndroidApplicationConfiguration cfg = new AndroidApplicationConfiguration();
    cfg.useGyroscope = false;
    cfg.useCompass = true;
    cfg.useAccelerometer = true;

    // 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);

    RelativeLayout layout = new RelativeLayout(this);
    RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(
            RelativeLayout.LayoutParams.MATCH_PARENT,
            RelativeLayout.LayoutParams.MATCH_PARENT);
    layout.setLayoutParams(params);

    AdView admobView = createAdView();
    layout.addView(admobView);
    View gameView = createGameView(cfg);
    layout.addView(gameView);

    setContentView(layout);
    startAdvertising(admobView);
}
 
开发者ID:tgobbens,项目名称:fluffybalance,代码行数:32,代码来源:AndroidLauncher.java

示例4: onCreate

import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; //导入依赖的package包/类
@Override
protected void onCreate (Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
       /*requestWindowFeature(Window.FEATURE_NO_TITLE);
       getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);*/

	AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();

       if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
           Bitmap bm = BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher);
           ActivityManager.TaskDescription td = new ActivityManager.TaskDescription("Les Chroniques De Norwand", bm, Color.parseColor("#30346D"));

           setTaskDescription(td);
           bm.recycle();
       }

       config.useImmersiveMode = true;

	initialize(new MainGame(""), config);
}
 
开发者ID:Darkxell,项目名称:Les-Chroniques-de-Norwand,代码行数:21,代码来源:AndroidLauncher.java

示例5: onCreate

import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    
    if(savedInstanceState == null){
     AssetRepository.getInstance().dispose();
     
     sharedPreferences = getPreferences(Context.MODE_PRIVATE);
     config = new AndroidApplicationConfiguration();
     config.numSamples = 1;
			
     gameBase = new GameBase(this);
     gameBase.highScore = sharedPreferences.getInt(getString(R.string.saved_high_score), 0);
     vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
	
     initialize(gameBase, config);
    }
}
 
开发者ID:raphaelbruno,项目名称:ZombieInvadersVR,代码行数:19,代码来源:ZombieInvadersVR.java

示例6: onCreate

import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; //导入依赖的package包/类
@Override
	protected void onCreate (Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		int res = ContextCompat.checkSelfPermission(this.getContext(), Manifest.permission.WRITE_EXTERNAL_STORAGE);
		if(res != PackageManager.PERMISSION_GRANTED) {
			ActivityCompat.requestPermissions(
					this,
					new String[] { Manifest.permission.WRITE_EXTERNAL_STORAGE },
					0);
		}
		AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
		config.disableAudio = true;
		config.useWakelock = true;
		config.useCompass = false;
		config.useAccelerometer = false;
		config.useImmersiveMode = true;
//		config.hideStatusBar = true;
		config.useGL30 = true;
		Main main = new Main();
		main.fragmentShaderPath = Environment.getExternalStorageDirectory().getAbsolutePath() + "/shader.frag";
		initialize(main, config);
	}
 
开发者ID:mc-imperial,项目名称:libgdx-get-image,代码行数:23,代码来源:AndroidLauncher.java

示例7: initControls

import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; //导入依赖的package包/类
@Override
public void initControls() {
    gdxAdapter.setOnSceneLoadedListener(new DemoMotionGdxAdapter.OnSceneLoadedListener() {
        @Override
        public void onSceneLoaded() {
            sceneLoaded = true;
            runOnUiThread(new Runnable() {
                @Override
                public void run() {
                    presenter.setViewListener(DemoMotionActivity.this, deviceAddress);
                }
            });
        }
    });

    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    config.disableAudio = true;
    config.hideStatusBar = false;
    config.useAccelerometer = false;
    config.useCompass = false;
    config.useImmersiveMode = false;
    config.useWakelock = false;

    gdx3dView = initializeForView(gdxAdapter, config);
    carAnimationHolder.addView(gdx3dView);
}
 
开发者ID:SiliconLabs,项目名称:thunderboard-android,代码行数:27,代码来源:DemoMotionActivity.java

示例8: onCreate

import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_ar);
    Log.d(LOGTAG, "onCreate");

    session = new AppSession(this);
    session.initAR(this, ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

    mRenderer = new VuforiaRenderer(session);

    FrameLayout container = (FrameLayout) findViewById(R.id.ar_container);

    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    config.useAccelerometer = false;
    config.useCompass = false;
    //config.useGL20 = true;

    mEngine = new Engine(mRenderer);
    View glView = initializeForView(mEngine, config);

    container.addView(glView);

}
 
开发者ID:daemontus,项目名称:VuforiaLibGDX,代码行数:25,代码来源:ArActivity.java

示例9: onCreate

import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; //导入依赖的package包/类
/** Инициализация приложения */
@Override
protected void onCreate (Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();

	// Запрет на отключение экрана и использование датчиков имплементацией libgdx
	config.useWakelock = true;
	config.useAccelerometer = false;
	config.useGyroscope = false;
	config.useCompass = false;
	config.numSamples = 2;

	// Создание своего листенера данных с датчиков (поэтому useAccelerometer и т.п. не нужны)
	vrSensorManagerAndroid = new VRSensorManagerAndroid(this.getContext());
	initialize(new GdxVR(vrSensorManagerAndroid), config);
}
 
开发者ID:SinuXVR,项目名称:GdxVR-Sample-1,代码行数:18,代码来源:AndroidLauncher.java

示例10: onCreateView

import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    this.setLogLevel(100);

    //initialize platform bitmap factory
    org.oscim.android.canvas.AndroidGraphics.init();

    GdxAssets.init("");
    GLAdapter.init(new AndroidGL());

    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    config.stencil = 8;
    config.numSamples = 2;
    new SharedLibraryLoader().load("vtm-jni");

    View view = initializeForView(new CacheboxMain(), config);

    //initialize platform connector
    PlatformConnector.init(new AndroidPlatformConnector(this));

    return view;
}
 
开发者ID:Longri,项目名称:cachebox3.0,代码行数:25,代码来源:AndroidLauncherfragment.java

示例11: onCreate

import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; //导入依赖的package包/类
/**
 * Called when the activity is first created.
 */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    mainHandler = new Handler(getMainLooper());

    DisplayMetrics metrics = new DisplayMetrics();
    getWindowManager().getDefaultDisplay().getMetrics(metrics);

    AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    config.hideStatusBar = true;
    config.useAccelerometer = false;
    config.useCompass = false;

    final AndroidMobileApi api = new AndroidMobileApi(this);
    initialize(new DiceHeroes(api), config);
    gameServicesHelper = new GameServicesHelper(this);
    purchaseHelper = new PurchaseHelper(this, api);
}
 
开发者ID:ratrecommends,项目名称:dice-heroes,代码行数:23,代码来源:MainActivity.java

示例12: onCreate

import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; //导入依赖的package包/类
@Override
protected void onCreate (Bundle savedInstanceState)
{
	super.onCreate(savedInstanceState);
	AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
	config.useImmersiveMode = true;
	gameHelper = new GameHelper(this, GameHelper.CLIENT_GAMES);
	gameHelper.enableDebugLog(false);

	GameHelper.GameHelperListener gameHelperListener = new GameHelper.GameHelperListener()
	{
		@Override
		public void onSignInFailed(){ }

		@Override
		public void onSignInSucceeded(){ }
	};

	gameHelper.setup(gameHelperListener);
	AdBuddiz.setPublisherKey("9bfbf1bb-a9e2-4ce5-8dfd-f25455ceb714");
	AdBuddiz.cacheAds(this);
	initialize(new Application(this, this, this, Application.Platform.ANDROID), config);
	setupAds();
}
 
开发者ID:NahroTo,项目名称:Fruit-Destroyer,代码行数:25,代码来源:AndroidLauncher.java

示例13: onCreate

import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; //导入依赖的package包/类
@Override
protected void onCreate (Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
	config.useAccelerometer = false;
	config.useCompass = false;
	config.useGyroscope = false;
	config.useWakelock = false;
	initialize(new GGVmApplication(GameModuleProvider.provideGameModule(), MobileMenu.class, TouchInputProcessor.class), config);
}
 
开发者ID:gradualgames,项目名称:ggvm,代码行数:11,代码来源:AndroidLauncher.java

示例14: onCreate

import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; //导入依赖的package包/类
@Override
protected void onCreate (Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);


	AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
	Log.d("ANDROID_Launcher","initialize");
	initialize(new NoRiskNoFun(getIpAddress()), config);
}
 
开发者ID:cpppwner,项目名称:NoRiskNoFun,代码行数:10,代码来源:AndroidLauncher.java

示例15: onCreate

import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; //导入依赖的package包/类
@Override
protected void onCreate (Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
       //config.addIcon("chapaicon.png", Files.FileType.Internal);
	initialize(new FlappyChapa(), config);
}
 
开发者ID:RubenMateus,项目名称:FlappyChapa,代码行数:8,代码来源:AndroidLauncher.java


注:本文中的com.badlogic.gdx.backends.android.AndroidApplicationConfiguration类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。