Guest User

Untitled

a guest
May 24th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. Here is the library reference for the dialog that i am using:
  2.  
  3. https://github.com/aritchie/userdialogs
  4.  
  5. Here is my page.xaml.cs file:
  6.  
  7. [XamlCompilation(XamlCompilationOptions.Compile)]
  8. public partial class Page1 : ContentPage
  9. {
  10. public Page1 ()
  11. {
  12. InitializeComponent ();
  13. UserDialogs.Instance.Alert("Demo Dialog", "Dialog", "ok");
  14. }
  15. }
  16.  
  17. Here is the android ManinActivity.cs file:
  18.  
  19. [Activity(Label = "App3", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
  20. public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
  21. {
  22. protected override void OnCreate(Bundle bundle)
  23. {
  24. TabLayoutResource = Resource.Layout.Tabbar;
  25. ToolbarResource = Resource.Layout.Toolbar;
  26. UserDialogs.Init(() => (Activity)Forms.Context);
  27. base.OnCreate(bundle);
  28.  
  29. global::Xamarin.Forms.Forms.Init(this, bundle);
  30. LoadApplication(new App());
  31. }
  32. }
  33.  
  34. Here is my appDelegate.cs file for iOS:
  35.  
  36. public override bool FinishedLaunching(UIApplication app, NSDictionary options)
  37. {
  38. global::Xamarin.Forms.Forms.Init();
  39. LoadApplication(new App());
  40.  
  41. return base.FinishedLaunching(app, options);
  42. }
  43.  
  44. Here is my Main.cs file for iOS:
  45.  
  46. public class Application
  47. {
  48. // This is the main entry point of the application.
  49. static void Main(string[] args)
  50. {
  51. // if you want to use a different Application Delegate class from "AppDelegate"
  52. // you can specify it here.
  53. UIApplication.Main(args, null, "AppDelegate");
  54. }
  55. }
Add Comment
Please, Sign In to add comment