當前位置: 首頁>>代碼示例>>Java>>正文


Java IOSApplication類代碼示例

本文整理匯總了Java中com.badlogic.gdx.backends.iosrobovm.IOSApplication的典型用法代碼示例。如果您正苦於以下問題:Java IOSApplication類的具體用法?Java IOSApplication怎麽用?Java IOSApplication使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


IOSApplication類屬於com.badlogic.gdx.backends.iosrobovm包,在下文中一共展示了IOSApplication類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: didFinishLoad

import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
@Override
public void didFinishLoad(UIWebView webView) {
    String loadedUrl = webView.getRequest().getURL().getAbsoluteString();
    log.debug("DidFinishHtmlLoad {}", loadedUrl);

    if (loadedUrl.startsWith("http://oauth.team-cachebox.de/")
            || loadedUrl.startsWith("http://staging.oauth.team-cachebox.de/")) {
        //parse content of oauth result
        String content = webView.evaluateJavaScript("document.body.textContent");

        String search = "Access token: ";
        int pos = content.indexOf(search) + search.length();
        // between pos und pos2 shut be a valid  AccessToken!!!
        final String accessToken = content.substring(pos).trim();

        log.debug("pos: {}, AccesToken= {}", pos, accessToken);
        this.callBack.callBack(accessToken);
        //reload GlView
        webView.removeFromSuperview();
        ((IOSApplication) Gdx.app).getUIWindow().setRootViewController(this.mainViewController);
        ((IOSApplication) Gdx.app).getUIWindow().makeKeyAndVisible();
    }

}
 
開發者ID:Longri,項目名稱:cachebox3.0,代碼行數:25,代碼來源:GenerateApiKeyWebViewController.java

示例2: getPlatformDescriptionView

import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
@Override
protected void getPlatformDescriptionView(final GenericCallBack<PlatformDescriptionView> callBack) {
    log.debug("show WebView as descriptionView");
    try {
        if (descriptionView == null) {
            UIViewController mainViewController = ((IOSApplication) Gdx.app).getUIWindow().getRootViewController();
            descriptionView = new IOS_DescriptionView(mainViewController);
            log.debug("return new DescriptionView");
        } else {
            log.debug("return existing DescriptionView");
        }
        callBack.callBack(descriptionView);
    } catch (Exception e) {
        log.error("show web view", e);
    }

}
 
開發者ID:Longri,項目名稱:cachebox3.0,代碼行數:18,代碼來源:IOS_PlatformConnector.java

示例3: createApplication

import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
@Override
protected IOSApplication createApplication() {
    Thread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandler() {
        @Override
        public void uncaughtException(Thread t, Throwable e) {
            /*
             * Avoid instantiating LoggerFactory in a static context to work around a race condition
             * caused by IOSApplication changing System.out/System.err
             */
            Logger logger = LoggerFactory.getLogger(IosLauncher.class);
            logger.error("Uncaught exception from {}", t, e);
        }
    });

    IOSApplicationConfiguration config = new IOSApplicationConfiguration();

    InternalGdxFileSystem resourceFileSystem = new InternalGdxFileSystem("");
    IosLocalFileSystem outputFileSystem = new IosLocalFileSystem();
    Launcher launcher = new Launcher(resourceFileSystem, outputFileSystem);

    return new IOSApplication(launcher, config);
}
 
開發者ID:anonl,項目名稱:nvlist,代碼行數:23,代碼來源:IosLauncher.java

示例4: createApplication

import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new Game(new Advertisements() {
        @Override
        public void showAds() {

        }
    }), config);
}
 
開發者ID:MrGussio,項目名稱:EarthInvadersGDX,代碼行數:11,代碼來源:IOSLauncher.java

示例5: createApplication

import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
@Override
protected IOSApplication createApplication()
{
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    final String version = NSBundle.getMainBundle().getInfoDictionaryObject("CFBundleShortVersionString").toString();
    return new IOSApplication(new PixelDungeon(new PDPlatformSupport(version, null, new IOSInputProcessor())), config);
}
 
開發者ID:kurtyu,項目名稱:PixelDungeonTC,代碼行數:8,代碼來源:IOSLauncher.java

示例6: createApplication

import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
@Override
protected IOSApplication createApplication() {

    CB.setGlobalScale(1);

    final String appDir = System.getenv("HOME");
    final String localPath = appDir + "/Library/local/";

    LibgdxLogger.PROPERTIES_FILE_HANDLE = new LibgdxLoggerIosFileHandle(localPath, Files.FileType.Absolute).child(LibgdxLogger.CONFIGURATION_FILE_XML);
    LibgdxLogger.initial(LibgdxLogger.PROPERTIES_FILE_HANDLE);


    //initialize platform bitmap factory
    IosGraphics.init();


    //initialize platform connector
    PlatformConnector.init(new IOS_PlatformConnector(this));
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    config.multisample = GLKViewDrawableMultisample._4X;
    config.orientationLandscape = false;
    config.orientationPortrait = true;
    config.stencilFormat = GLKViewDrawableStencilFormat._8;
    GdxAssets.init("assets/");
    GLAdapter.init(new IosGL());

    return new IOSApplication(new CacheboxMain(), config);
}
 
開發者ID:Longri,項目名稱:cachebox3.0,代碼行數:29,代碼來源:IOS_Launcher.java

示例7: display

import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
@Override
public void display() {
    CGRect rect = new CGRect(20, 20, 200, 200);
    webView.setAccessibilityFrame(rect);
    mainViewController.addChildViewController(this);
    webView.setBounds(rect);
    ((IOSApplication) Gdx.app).getUIWindow().addSubview(webView);
}
 
開發者ID:Longri,項目名稱:cachebox3.0,代碼行數:9,代碼來源:IOS_DescriptionView.java

示例8: generateApiKey

import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
@Override
protected void generateApiKey(GenericCallBack<String> callBack) {
    log.debug("show WebView for get API key");
    try {
        UIViewController mainViewController = ((IOSApplication) Gdx.app).getUIWindow().getRootViewController();
        GenerateApiKeyWebViewController controller = new GenerateApiKeyWebViewController(callBack, mainViewController);
        ((IOSApplication) Gdx.app).getUIWindow().setRootViewController(controller);
        ((IOSApplication) Gdx.app).getUIWindow().makeKeyAndVisible();
    } catch (Exception e) {
        log.error("show web view", e);
    }
}
 
開發者ID:Longri,項目名稱:cachebox3.0,代碼行數:13,代碼來源:IOS_PlatformConnector.java

示例9: _getMultilineTextInput

import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
@Override
public void _getMultilineTextInput(final Input.TextInputListener listener, String title, String text, String hint) {

    textInputView = new IOS_TextInputView(((IOSApplication) Gdx.app).getUIWindow()
            .getRootViewController(), text, new IOS_TextInputView.Callback() {
        @Override
        public void okClicked(String text) {
            listener.input(text);
            Gdx.app.postRunnable(new Runnable() {
                @Override
                public void run() {
                    disposeInputView();
                }
            });
        }

        @Override
        public void cancelClicked() {
            Gdx.app.postRunnable(new Runnable() {
                @Override
                public void run() {
                    disposeInputView();
                }
            });
        }
    });


    // buildUIAlertView(listener, title, text, hint);
}
 
開發者ID:Longri,項目名稱:cachebox3.0,代碼行數:31,代碼來源:IOS_PlatformConnector.java

示例10: domob

import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
private void domob() {
	final UIViewController controller = ((IOSApplication)
			  Gdx.app).getUIViewController();
	
	DMSplashAdController cotroller = new DMSplashAdController("56OJzBWouN1uFPD9LZ", "16TLmT-vApG01NUvNJDvaK-s", getWindow());
	cotroller.setDelegate(this);
	//cotroller.loadView();
	cotroller.present();
//	if (cotroller.getIsReady()) {
		//cotroller.present();
//	}
}
 
開發者ID:tianqiujie,項目名稱:robovm-ios-bindings,代碼行數:13,代碼來源:IOSLauncher.java

示例11: showBanner

import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
@Override
public void showBanner() {
	/*
	 * final GADBannerView mBannerView = new
	 * GADBannerView(GADAdSize.smartBannerPortrait());
	 * mBannerView.setAdUnitID("ca-app-pub-1743332321423234/2574098708");
	 * 
	 * final UIViewController controller = ((IOSApplication)
	 * Gdx.app).getUIViewController();
	 * 
	 * GADRequest request = GADRequest.create(); List<String> devices = new
	 * ArrayList<String>(); devices.add(GADRequest.GAD_SIMULATOR_ID);
	 * mBannerView.setRootViewController(controller);
	 * controller.getView().addSubview(mBannerView);
	 * 
	 * mBannerView.loadRequest(request);
	 */
	final UIViewController controller = ((IOSApplication)
			  Gdx.app).getUIViewController();
	
	DMAdView mAdView = new DMAdView("56OJzBWouN1uFPD9LZ", "16TLmT-vApG01NUvNBqMTlRz");
	mAdView.setDelegate(this);
	mAdView.setFrame(new CGRect(0, 0, DMAdView.DOMOB_AD_SIZE_320x50.getWidth(), DMAdView.DOMOB_AD_SIZE_320x50.getHeight()));
	mAdView.setRootViewController(controller);
	controller.getView().addSubview(mAdView);
	mAdView.loadAd();
	
	
}
 
開發者ID:tianqiujie,項目名稱:robovm-ios-bindings,代碼行數:30,代碼來源:IOSLauncher.java

示例12: createApplication

import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new GGVmApplication(GameModuleProvider.provideGameModule(), MobileMenu.class, TouchInputProcessor.class), config);
}
 
開發者ID:gradualgames,項目名稱:ggvm,代碼行數:6,代碼來源:IOSLauncher.java

示例13: createApplication

import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new MainClass(), config);
}
 
開發者ID:hypeofpipe,項目名稱:Race99,代碼行數:6,代碼來源:IOSLauncher.java

示例14: createApplication

import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new MyGdxGame(), config);
}
 
開發者ID:davyjoneswang,項目名稱:libgdx-learnlib,代碼行數:6,代碼來源:IOSLauncher.java

示例15: createApplication

import com.badlogic.gdx.backends.iosrobovm.IOSApplication; //導入依賴的package包/類
@Override
protected IOSApplication createApplication() {
    IOSApplicationConfiguration config = new IOSApplicationConfiguration();
    return new IOSApplication(new GdxArtemisGame(), config);
}
 
開發者ID:DaanVanYperen,項目名稱:odb-artax,代碼行數:6,代碼來源:IOSLauncher.java


注:本文中的com.badlogic.gdx.backends.iosrobovm.IOSApplication類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。