Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Here is the library reference for the dialog that i am using:
- https://github.com/aritchie/userdialogs
- Here is my page.xaml.cs file:
- [XamlCompilation(XamlCompilationOptions.Compile)]
- public partial class Page1 : ContentPage
- {
- public Page1 ()
- {
- InitializeComponent ();
- UserDialogs.Instance.Alert("Demo Dialog", "Dialog", "ok");
- }
- }
- Here is the android ManinActivity.cs file:
- [Activity(Label = "App3", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
- public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
- {
- protected override void OnCreate(Bundle bundle)
- {
- TabLayoutResource = Resource.Layout.Tabbar;
- ToolbarResource = Resource.Layout.Toolbar;
- UserDialogs.Init(() => (Activity)Forms.Context);
- base.OnCreate(bundle);
- global::Xamarin.Forms.Forms.Init(this, bundle);
- LoadApplication(new App());
- }
- }
- Here is my appDelegate.cs file for iOS:
- public override bool FinishedLaunching(UIApplication app, NSDictionary options)
- {
- global::Xamarin.Forms.Forms.Init();
- LoadApplication(new App());
- return base.FinishedLaunching(app, options);
- }
- Here is my Main.cs file for iOS:
- public class Application
- {
- // This is the main entry point of the application.
- static void Main(string[] args)
- {
- // if you want to use a different Application Delegate class from "AppDelegate"
- // you can specify it here.
- UIApplication.Main(args, null, "AppDelegate");
- }
- }
Add Comment
Please, Sign In to add comment