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(); } }