public override bool FinishedLaunching(UIApplication app, NSDictionary options) { PlatformOpenTokService.Init(); global::Xamarin.Forms.Forms.Init(); AiForms.Dialogs.Dialogs.Init(); Xamarin.FormsMaps.Init(); Xamarin.FormsGoogleMaps.Init(AppConfigurations.IosGoogleMapsAPIKey); App.Context = this; Firebase.Core.App.Configure(); Rg.Plugins.Popup.Popup.Init(); Plugin.InputKit.Platforms.iOS.Config.Init(); CGRect bounds = UIScreen.MainScreen.Bounds; if (UIApplication.SharedApplication.StatusBarOrientation == UIInterfaceOrientation.LandscapeLeft || UIApplication.SharedApplication.StatusBarOrientation == UIInterfaceOrientation.LandscapeRight) { bounds.Size = new CGSize(bounds.Size.Height, bounds.Size.Width); } activityIndicator = new UIActivityIndicator(bounds); string id = null; string alert = null; string code = null; string url = string.Empty; if (options != null && options.Keys != null && options.Keys.Count() != 0 && options.ContainsKey(new NSString("UIApplicationLaunchOptionsRemoteNotificationKey"))) { var remoteNotificationKey = options.ObjectForKey(new NSString("UIApplicationLaunchOptionsRemoteNotificationKey")) as NSDictionary; if (null != remoteNotificationKey && remoteNotificationKey.ContainsKey(new NSString("aps"))) { NSDictionary aps = remoteNotificationKey.ObjectForKey(new NSString("aps")) as NSDictionary; if (aps.ContainsKey(new NSString("id"))) { id = (aps[new NSString("id")] as NSString).ToString(); } if (aps.ContainsKey(new NSString("alert"))) { alert = (aps[new NSString("alert")] as NSString).ToString(); } if (aps.ContainsKey(new NSString("code"))) { code = (aps[new NSString("code")] as NSString).ToString(); } if (aps.ContainsKey(new NSString("Url"))) { url = (aps[new NSString("Url")] as NSString).ToString(); } } } LoadApplication(new App(id, alert, code, url)); return(base.FinishedLaunching(app, options)); }
public UIActivityIndicator AddNewIndicator() { var indicator = UIActivityIndicator.Instantiate(); AddItem(indicator); return(indicator); }
public static new UIActivityIndicator Instantiate() { GameObject go = MonoBehaviour.Instantiate(App.shared.LoadGameObject(UI.BUTTONPREFAB)); UI.AssignToCanvas(go); Destroy(go.GetComponent <UIButton>()); UIActivityIndicator indicator = go.AddComponent <UIActivityIndicator>(); return(indicator); }
void ShowCodeForm() { menu.Reset(); titleText = menu.AddNewText().SetText("Enter Code Emailed To " + email + ":"); codeInput = menu.AddNewInput(); codeInput.capitalizes = true; codeInput.characterLimit = 6; submitCodeButton = menu.AddNewButton().SetText("Submit").SetAction(SubmitCode); submitCodeIndicator = menu.AddNewIndicator(); submitCodeIndicator.showsDotsInline = true; submitCodeIndicator.Hide(); menu.AddNewButton().SetText("Cancel").SetAction(CancelCode).SetIsBackItem(true); menu.Show(); menu.SelectItem(codeInput); }
public override void EnterFrom(AppState state) { base.EnterFrom(state); menu.Reset(); title = menu.AddNewText().SetText("Account Settings"); menu.AddNewText().SetText("Email:"); emailInput = menu.AddNewInput(); emailInput.characterLimit = 64; emailInput.inputComponent.contentType = UnityEngine.UI.InputField.ContentType.EmailAddress; emailInput.text = app.account.email; menu.AddNewText().SetText("Screen Name:"); screenNameInput = menu.AddNewInput(); screenNameInput.capitalizes = true; screenNameInput.characterLimit = 20; screenNameInput.inputComponent.contentType = UnityEngine.UI.InputField.ContentType.Alphanumeric; screenNameInput.text = app.account.screenName; over13Toggle = menu.AddNewButton().SetText("I'm 13 years of age or older").SetData(false).SetAction(Over13Clicked); saveButton = menu.AddNewButton().SetText("Save").SetAction(SaveActivated); saveIndicator = menu.AddNewIndicator(); saveIndicator.text = ""; saveIndicator.showsDotsInline = true; saveIndicator.Hide(); backButton = menu.AddNewButton().SetText("Back").SetAction(BackActivated).SetIsBackItem(true); menu.Show(); menu.SelectItem(emailInput); }
public static UIActivityIndicator ActivityIndicator(string text = "", string skin = "Default") { var indicator = UIActivityIndicator.Instantiate(); indicator.text = text; return(indicator); /* * skin += "/"; * GameObject go = new GameObject (); * UIActivityIndicator indicator = go.AddComponent<UIActivityIndicator> (); * AssignToCanvas (go); * indicator.GetComponent<Image> ().overrideSprite = Resources.Load<Sprite> (SKINDIR + skin + "Activity"); * indicator.GetComponent<Image> ().color = new Color (1, 1, 1, 0); * Text _text = indicator.SetText (text); * _text.resizeTextForBestFit = true; * _text.alignment = TextAnchor.LowerCenter; * _text.rectTransform.sizeDelta = new Vector2 (Screen.width, 200); * indicator.SetSize (400, 200); * indicator.Hide (); * indicator.name = "ActivityIndicator"; * return indicator; */ }
void ShowRequestMenu() { menu.Reset(); if (matchmaker.isConnected) { titleText = menu.AddNewText().SetText("Enter Email:"); emailInput = menu.AddNewInput(); emailInput.SetText(""); emailInput.capitalizes = false; requestCodeIndicator = menu.AddNewIndicator(); requestCodeIndicator.showsDotsInline = true; requestCodeIndicator.Hide(); requestCodeButton = menu.AddNewButton().SetText("Request Login Code").SetAction(RequestLoginCode); } else { menu.AddNewText().SetText("Can't connect to server.").UseAlertStyle(); } menu.AddNewButton().SetText("Back").SetAction(Back).SetIsBackItem(true); menu.Show(); }