Exemplo n.º 1
0
        private static void navigate(AndroidNav page, bool removeActivityStack = false)
#endif
        {
            try
            {
#if WINDOWS_PHONE
                navigationService.Navigate(new Uri(url, UriKind.RelativeOrAbsolute));
#else
                Intent intent = new Intent(navigationContext, page.type);
                if (removeActivityStack)
                {
                    intent.AddFlags(ActivityFlags.ClearTop | ActivityFlags.NewTask | ActivityFlags.ClearTask);
                }
                navigationContext.StartActivity(intent);
#endif
            }
            catch (Exception ex)
            {
                LittleWatson.ReportException(ex);
            }
        }
Exemplo n.º 2
0
        private static void Back(AndroidNav page)
#endif
        {
#if WINDOWS_PHONE
            try { if (navigationService.CanGoBack)
                  {
                      navigationService.GoBack();
                  }
            }
            catch (Exception ex) { LittleWatson.ReportException(ex); }
#else
            if (page.activity != null)
            {
                page.activity.Finish();
            }

#if DEBUG
            //else
            //Debugger.Break();
#endif
#endif
        }