本文整理汇总了Java中org.robovm.apple.uikit.UIApplicationLaunchOptions类的典型用法代码示例。如果您正苦于以下问题:Java UIApplicationLaunchOptions类的具体用法?Java UIApplicationLaunchOptions怎么用?Java UIApplicationLaunchOptions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UIApplicationLaunchOptions类属于org.robovm.apple.uikit包,在下文中一共展示了UIApplicationLaunchOptions类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:playn,项目名称:playn-samples,代码行数:21,代码来源:CuteGameRoboVM.java
示例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;
}
开发者ID:playn,项目名称:playn-samples,代码行数:20,代码来源:DropRoboVM.java
示例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;
}
开发者ID:playn,项目名称:playn-samples,代码行数:21,代码来源:HelloGameRoboVM.java
示例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;
}
开发者ID:playn,项目名称:playn-samples,代码行数:20,代码来源:PhysicsRoboVM.java
示例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;
}
开发者ID:playn,项目名称:playn,代码行数:20,代码来源:TestsGameRoboVM.java
示例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;
}
开发者ID:playn,项目名称:playn,代码行数:20,代码来源:__JavaGameClassName__RoboVM.java
示例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;
}
开发者ID:social-startup-game,项目名称:social-startup-game,代码行数:20,代码来源:SimGameRoboVM.java
示例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;
}
开发者ID:robovm,项目名称:robovm-samples,代码行数:20,代码来源:FlurryApp.java
示例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;
}
开发者ID:robovm,项目名称:robovm-samples,代码行数:22,代码来源:AppDelegate.java
示例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;
}
开发者ID:robovm,项目名称:robovm-samples,代码行数:20,代码来源:MetalBasic2D.java
示例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;
}
开发者ID:robovm,项目名称:robovm-samples,代码行数:20,代码来源:StreetScroller.java
示例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;
}
开发者ID:robovm,项目名称:robovm-samples,代码行数:25,代码来源:InAppPurchases.java
示例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;
}
开发者ID:robovm,项目名称:robovm-samples,代码行数:22,代码来源:MoviePlayer.java
示例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;
}
开发者ID:robovm,项目名称:robovm-samples,代码行数:23,代码来源:Regions.java
示例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;
}
开发者ID:robovm,项目名称:robovm-samples,代码行数:19,代码来源:App.java
示例16: didFinishLaunching
import org.robovm.apple.uikit.UIApplicationLaunchOptions; //导入依赖的package包/类
@Override
public boolean didFinishLaunching (UIApplication application, UIApplicationLaunchOptions launchOptions) {
// Set up the view controller.
iapStoreViewController = new IAPStoreProductViewController();
rootNavigationController = new UINavigationController(iapStoreViewController);
// 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();
/*
* Retains the window object until the application is deallocated. Prevents Java GC from collecting the window object too
* early.
*/
addStrongRef(window);
return true;
}
开发者ID:robovm,项目名称:robovm-samples,代码行数:22,代码来源:Main.java
示例17: didFinishLaunching
import org.robovm.apple.uikit.UIApplicationLaunchOptions; //导入依赖的package包/类
@Override
public boolean didFinishLaunching(UIApplication application, UIApplicationLaunchOptions launchOptions) {
// load our data source and hand it over to APLMainTableViewController
List<APLProduct> productsList = new ArrayList<>();
productsList.add(new APLProduct(APLProduct.getDeviceTypeTitle(), "iPhone", 2007, 599.00));
productsList.add(new APLProduct(APLProduct.getDeviceTypeTitle(), "iPod", 2001, 399.00));
productsList.add(new APLProduct(APLProduct.getDeviceTypeTitle(), "iPod touch", 2007, 210.00));
productsList.add(new APLProduct(APLProduct.getDeviceTypeTitle(), "iPad", 2010, 499.00));
productsList.add(new APLProduct(APLProduct.getDeviceTypeTitle(), "iPad mini", 2012, 659.00));
productsList.add(new APLProduct(APLProduct.getDeviceTypeTitle(), "iMac", 1997, 1299.00));
productsList.add(new APLProduct(APLProduct.getDeviceTypeTitle(), "Mac Pro", 2006, 2499.00));
productsList.add(new APLProduct(APLProduct.getPortableTypeTitle(), "MacBook Air", 2008, 1799.00));
productsList.add(new APLProduct(APLProduct.getPortableTypeTitle(), "MacBook Pro", 2006, 1499.00));
UINavigationController navigationController = (UINavigationController) getWindow().getRootViewController();
// note we want the first view controller (not the
// visibleViewController) in case
// we are being store from UIStateRestoration
APLMainTableViewController viewController = (APLMainTableViewController) navigationController
.getViewControllers().get(0);
viewController.setProducts(productsList);
return true;
}
开发者ID:robovm,项目名称:robovm-samples,代码行数:25,代码来源:TableSearch.java
示例18: didFinishLaunching
import org.robovm.apple.uikit.UIApplicationLaunchOptions; //导入依赖的package包/类
@Override
public boolean didFinishLaunching(UIApplication application, UIApplicationLaunchOptions launchOptions) {
// Set up the view controller.
rootViewController = new RootViewController();
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();
return true;
}
开发者ID:robovm,项目名称:robovm-samples,代码行数:17,代码来源:VideoRecorder.java
示例19: 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.lightGray());
UINavigationController navigationController = new UINavigationController(application.addStrongRef(new ViewController()));
window.setRootViewController(navigationController);
window.makeKeyAndVisible();
// Ties UIWindow instance together with UIApplication object on the
// Objective C side of things
// Basically meaning that it wont be GC:ed on the java side until it is
// on the Objective C side
application.addStrongRef(window);
return true;
}
开发者ID:robovm,项目名称:robovm-samples,代码行数:18,代码来源:CustomAnimatableProperty.java
示例20: 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 Ziggurat(plat);
// make our main window visible (this starts the platform)
window.makeKeyAndVisible();
addStrongRef(window);
return true;
}
开发者ID:samskivert,项目名称:mashups,代码行数:20,代码来源:ZigguratRoboVM.java
注:本文中的org.robovm.apple.uikit.UIApplicationLaunchOptions类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论