本文整理汇总了Java中org.robovm.apple.uikit.UIApplicationLaunchOptions类的典型用法代码示例。如果您正苦于以下问题:Java UIApplicationLaunchOptions类的具体用法?Java UIApplicationLaunchOptions怎么用?Java UIApplicationLaunchOptions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UIApplicationLaunchOptions类属于org.robovm.apple.uikit包,在下文中一共展示了UIApplicationLaunchOptions类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: didFinishLaunching
import org.robovm.apple.uikit.UIApplicationLaunchOptions; //导入依赖的package包/类
@Override
public boolean didFinishLaunching (UIApplication app, UIApplicationLaunchOptions launchOpts) {
// create a full-screen window
CGRect bounds = UIScreen.getMainScreen().getBounds();
UIWindow window = new UIWindow(bounds);
// create and initialize the PlayN platform
RoboPlatform.Config config = new RoboPlatform.Config();
config.orients = UIInterfaceOrientationMask.All;
RoboPlatform pf = RoboPlatform.create(window, config);
addStrongRef(pf);
// create our game
new CuteGame(pf);
// make our main window visible (the platform starts when the window becomes viz)
window.makeKeyAndVisible();
addStrongRef(window);
return true;
}
示例2: didFinishLaunching
import org.robovm.apple.uikit.UIApplicationLaunchOptions; //导入依赖的package包/类
@Override
public boolean didFinishLaunching (UIApplication app, UIApplicationLaunchOptions launchOpts) {
// create a full-screen window
CGRect bounds = UIScreen.getMainScreen().getBounds();
UIWindow window = new UIWindow(bounds);
// configure and create the PlayN platform
RoboPlatform.Config config = new RoboPlatform.Config();
config.orients = UIInterfaceOrientationMask.All;
RoboPlatform plat = RoboPlatform.create(window, config);
// create and initialize our game
new Drop(plat);
// make our main window visible (this starts the platform)
window.makeKeyAndVisible();
addStrongRef(window);
return true;
}
示例3: didFinishLaunching
import org.robovm.apple.uikit.UIApplicationLaunchOptions; //导入依赖的package包/类
@Override
public boolean didFinishLaunching (UIApplication app, UIApplicationLaunchOptions launchOpts) {
// create a full-screen window
CGRect bounds = UIScreen.getMainScreen().getBounds();
UIWindow window = new UIWindow(bounds);
// create and initialize the PlayN platform
RoboPlatform.Config config = new RoboPlatform.Config();
config.orients = UIInterfaceOrientationMask.All;
RoboPlatform pf = RoboPlatform.create(window, config);
addStrongRef(pf);
// create our game
new HelloGame(pf);
// make our main window visible (the platform starts when the window becomes viz)
window.makeKeyAndVisible();
addStrongRef(window);
return true;
}
示例4: didFinishLaunching
import org.robovm.apple.uikit.UIApplicationLaunchOptions; //导入依赖的package包/类
@Override
public boolean didFinishLaunching (UIApplication app, UIApplicationLaunchOptions launchOpts) {
// create a full-screen window
CGRect bounds = UIScreen.getMainScreen().getBounds();
UIWindow window = new UIWindow(bounds);
// create and initialize the PlayN platform
RoboPlatform.Config config = new RoboPlatform.Config();
config.orients = UIInterfaceOrientationMask.Landscape;
RoboPlatform pf = RoboPlatform.create(window, config);
addStrongRef(pf);
new Physics(pf);
// make our main window visible (the platform starts when the window becomes viz)
window.makeKeyAndVisible();
addStrongRef(window);
return true;
}
示例5: didFinishLaunching
import org.robovm.apple.uikit.UIApplicationLaunchOptions; //导入依赖的package包/类
@Override
public boolean didFinishLaunching (UIApplication app, UIApplicationLaunchOptions launchOpts) {
// create a full-screen window
CGRect bounds = UIScreen.getMainScreen().getBounds();
UIWindow window = new UIWindow(bounds);
// configure and register the PlayN platform
RoboPlatform.Config config = new RoboPlatform.Config();
config.orients = UIInterfaceOrientationMask.All;
RoboPlatform pf = RoboPlatform.create(window, config);
// create and initialize our game
TestsGame game = new TestsGame(pf, new String[0]);
// make our main window visible
window.makeKeyAndVisible();
addStrongRef(window);
return true;
}
示例6: didFinishLaunching
import org.robovm.apple.uikit.UIApplicationLaunchOptions; //导入依赖的package包/类
@Override
public boolean didFinishLaunching (UIApplication app, UIApplicationLaunchOptions launchOpts) {
// create a full-screen window
CGRect bounds = UIScreen.getMainScreen().getBounds();
UIWindow window = new UIWindow(bounds);
// configure and create the PlayN platform
RoboPlatform.Config config = new RoboPlatform.Config();
config.orients = UIInterfaceOrientationMask.All;
RoboPlatform plat = RoboPlatform.create(window, config);
// create and initialize our game
new ${JavaGameClassName}(plat);
// make our main window visible (this starts the platform)
window.makeKeyAndVisible();
addStrongRef(window);
return true;
}
示例7: didFinishLaunching
import org.robovm.apple.uikit.UIApplicationLaunchOptions; //导入依赖的package包/类
@Override
public boolean didFinishLaunching(UIApplication app, UIApplicationLaunchOptions launchOpts) {
// create a full-screen window
CGRect bounds = UIScreen.getMainScreen().getBounds();
UIWindow window = new UIWindow(bounds);
// configure and create the PlayN platform
RoboPlatform.Config config = new RoboPlatform.Config();
config.orients = UIInterfaceOrientationMask.All;
RoboPlatform plat = RoboPlatform.create(window, config);
// create and initialize our game
new SimGame(plat);
// make our main window visible (this starts the platform)
window.makeKeyAndVisible();
addStrongRef(window);
return true;
}
示例8: didFinishLaunching
import org.robovm.apple.uikit.UIApplicationLaunchOptions; //导入依赖的package包/类
@Override
public boolean didFinishLaunching(UIApplication application, UIApplicationLaunchOptions launchOptions) {
// Remove the below lines to disable logging for release builds.
Flurry.setDebugLogEnabled(true);
Flurry.setLogLevel(FlurryLogLevel.All);
// Enable crash reporting.
Flurry.enableCrashReporting();
// Start Flurry.
Flurry.startSession(APP_KEY, launchOptions);
// Automatically log page views for all controllers in the view
// hierarchy of the root controller.
UINavigationController navController = (UINavigationController) getWindow().getRootViewController();
Flurry.logAllPageViews(navController);
return true;
}
示例9: didFinishLaunching
import org.robovm.apple.uikit.UIApplicationLaunchOptions; //导入依赖的package包/类
@Override
public boolean didFinishLaunching(UIApplication application, UIApplicationLaunchOptions launchOptions) {
if (launchOptions != null) {
UILocalNotification localNotification = launchOptions.getLocalNotification();
if (localNotification != null) {
// The application has been started from a local notification.
// Get and print our id parameter.
String id = localNotification.getUserInfo().getString(LOCAL_NOTIFICATION_ID_KEY);
getMyViewController().setStartText("App was started by local notification: " + id);
}
UIRemoteNotification remoteNotification = launchOptions.getRemoteNotification();
if (remoteNotification != null) {
// The application has been started from a remote/push
// notification.
getMyViewController().setStartText("App was started by remote notification!");
}
}
return true;
}
示例10: didFinishLaunching
import org.robovm.apple.uikit.UIApplicationLaunchOptions; //导入依赖的package包/类
@Override
public boolean didFinishLaunching(UIApplication application, UIApplicationLaunchOptions launchOptions) {
// Metal samples can only be run on device
if(System.getProperty("os.name").toLowerCase().contains("simulator")) {
throw new Error("Metal samples can only be run on physical devices");
}
// Set up the view controller.
rootViewController = new MetalBasic2DViewController();
// Create a new window at screen size.
window = new UIWindow(UIScreen.getMainScreen().getBounds());
// Set the view controller as the root controller for the window.
window.setRootViewController(rootViewController);
// Make the window visible.
window.makeKeyAndVisible();
return true;
}
示例11: didFinishLaunching
import org.robovm.apple.uikit.UIApplicationLaunchOptions; //导入依赖的package包/类
@Override
public boolean didFinishLaunching (UIApplication application, UIApplicationLaunchOptions launchOptions) {
// Set up the view controller.
streetScrollerViewController = new StreetScrollerViewController();
// Create a new window at screen size.
window = new UIWindow(UIScreen.getMainScreen().getBounds());
// Set our viewcontroller as the root controller for the window.
window.setRootViewController(streetScrollerViewController);
// Make the window visible.
window.makeKeyAndVisible();
/*
* Retains the window object until the application is deallocated. Prevents Java GC from collecting the window object too
* early.
*/
addStrongRef(window);
return true;
}
示例12: didFinishLaunching
import org.robovm.apple.uikit.UIApplicationLaunchOptions; //导入依赖的package包/类
@Override
public boolean didFinishLaunching(UIApplication application, UIApplicationLaunchOptions launchOptions) {
// Set up the view controller.
parentViewController = new ParentViewController();
rootNavigationController = new UINavigationController(parentViewController);
// Create a new window at screen size.
window = new UIWindow(UIScreen.getMainScreen().getBounds());
// Set our viewcontroller as the root controller for the window.
window.setRootViewController(rootNavigationController);
// Make the window visible.
window.makeKeyAndVisible();
// Attach an observer to the payment queue
SKPaymentQueue.getDefaultQueue().addTransactionObserver(StoreObserver.getInstance());
/*
* Retains the window object until the application is deallocated.
* Prevents Java GC from collecting the window object too early.
*/
addStrongRef(window);
return true;
}
示例13: didFinishLaunching
import org.robovm.apple.uikit.UIApplicationLaunchOptions; //导入依赖的package包/类
@Override
public boolean didFinishLaunching (UIApplication application, UIApplicationLaunchOptions launchOptions) {
window = new UIWindow(UIScreen.getMainScreen().getBounds());
window.setBackgroundColor(UIColor.white());
/* Setup a tab bar controller that handles our custom view controllers */
tabBarController = new UITabBarController();
tabBarController.addChildViewController(new MyStreamingMovieViewController());
tabBarController.addChildViewController(new MyLocalMovieViewController());
/* Set the tab bar controller as the root of our window. */
window.setRootViewController(tabBarController);
window.makeKeyAndVisible();
/*
* Retains the window object until the application is deallocated. Prevents Java GC from collecting the window object too
* early.
*/
addStrongRef(window);
return true;
}
示例14: didFinishLaunching
import org.robovm.apple.uikit.UIApplicationLaunchOptions; //导入依赖的package包/类
@Override
public boolean didFinishLaunching (UIApplication application, UIApplicationLaunchOptions launchOptions) {
// Set up the view controller.
rootViewController = new RegionsViewController();
navigationController = new UINavigationController(rootViewController);
// Create a new window at screen size.
window = new UIWindow(UIScreen.getMainScreen().getBounds());
// Set our viewcontroller as the root controller for the window.
window.setRootViewController(navigationController);
// Make the window visible.
window.makeKeyAndVisible();
/*
* Retains the window object until the application is deallocated. Prevents Java GC from collecting the window object too
* early.
*/
addStrongRef(window);
return true;
}
示例15: didFinishLaunching
import org.robovm.apple.uikit.UIApplicationLaunchOptions; //导入依赖的package包/类
@Override
public boolean didFinishLaunching(UIApplication application, UIApplicationLaunchOptions launchOptions) {
// Set up the view controller.
rootViewController = new ViewController();
UINavigationController navController = new UINavigationController(rootViewController);
navController.getNavigationBar().setBarStyle(UIBarStyle.Black);
navController.getNavigationBar().setTranslucent(true);
// Create a new window at screen size.
window = new UIWindow(UIScreen.getMainScreen().getBounds());
// Set the view controller as the root controller for the window.
window.setRootViewController(navController);
// Make the window visible.
window.makeKeyAndVisible();
return true;
}