예제 #1
0
 private void HandleReadLater()
 {
     try
     {
         var noticiasLocalService = new NoticiasLocalService();
         noticiasLocalService.Save(_noticia);
         Toast.MakeText(this, "Saved", ToastLength.Short).Show();
     }
     catch (Exception ex)
     {
         Toast.MakeText(this, "error: " + ex.Message, ToastLength.Long).Show();
     }
 }
        private void SaveSelectedNews(List <Noticia> selectedNoticias)
        {
            try
            {
                var noticiaLocalService = new NoticiasLocalService();
                foreach (var noticias in selectedNoticias)
                {
                    noticiaLocalService.Save(noticias);
                }

                Toast.MakeText(Activity, $"{selectedNoticias.Count} news saved", ToastLength.Short);
                selectedNoticias.Clear();
                Activity.InvalidateOptionsMenu();
                UnselectedElements();
            }
            catch (Exception ex)
            {
                Toast.MakeText(Activity, ex.Message, ToastLength.Short).Show();
            }
        }
예제 #3
0
 public SalvarListaDeNoticiaFragment()
 {
     _noticiasLocalService = new NoticiasLocalService();
 }