Ejemplo n.º 1
0
 public void UpdateNotificationList()
 {
     errorText.Visibility = ViewStates.Gone;
     if (adapter == null)
     {
         adapter = new NotificationListAdapter(presenter.notifications);
         notificationList.SetAdapter(adapter);
         adapter.ItemClick += (s, e) =>
         {
             presenter.OnNotifClicked(e);
         };
         adapter.DeleteItemClick += (s, e) =>
         {
             adapter.NotifyItemRemoved(e);
             presenter.OnNotifRemoved(e);
             //adapter.NotifyItemRangeChanged(e, adapter.ItemCount);
         };
         return;
     }
     adapter.notifications = presenter.notifications;
     adapter.NotifyItemRangeChanged(0, adapter.ItemCount);
 }
Ejemplo n.º 2
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            // Use this to return your custom view for this Fragment
            View itemView = inflater.Inflate(Resource.Layout.user_notification, container, false);

            notificationListRecycle = itemView.FindViewById <RecyclerView>(Resource.Id.notificationListRecylceView);

            _layoutManager = new LinearLayoutManager(this.Context);

            notificationListRecycle.SetLayoutManager(_layoutManager);

            notificationImage.Add(Resource.Raw.vendor);
            notificationImage.Add(Resource.Raw.vendor);
            notificationImage.Add(Resource.Raw.vendor);
            notificationImage.Add(Resource.Raw.vendor);
            notificationImage.Add(Resource.Raw.vendor);
            notificationImage.Add(Resource.Raw.vendor);
            notificationImage.Add(Resource.Raw.vendor);
            notificationImage.Add(Resource.Raw.vendor);
            notificationImage.Add(Resource.Raw.vendor);
            notificationImage.Add(Resource.Raw.vendor);
            notificationImage.Add(Resource.Raw.vendor);

            notificationDate.Add("12-jan-2017");
            notificationDate.Add("12-jan-2017");
            notificationDate.Add("12-jan-2017");
            notificationDate.Add("12-jan-2017");
            notificationDate.Add("12-jan-2017");
            notificationDate.Add("12-jan-2017");
            notificationDate.Add("12-jan-2017");
            notificationDate.Add("12-jan-2017");
            notificationDate.Add("12-jan-2017");
            notificationDate.Add("12-jan-2017");
            notificationDate.Add("12-jan-2017");

            notificationTitle.Add("Get Free Ride");
            notificationTitle.Add("Get Discount with 5 people");
            notificationTitle.Add("Get Free Ride");
            notificationTitle.Add("Get Discount with 5 people");
            notificationTitle.Add("Get Free Ride");
            notificationTitle.Add("Get Discount with 5 people");
            notificationTitle.Add("Get Free Ride");
            notificationTitle.Add("Get Discount with 5 people");
            notificationTitle.Add("Get Free Ride");
            notificationTitle.Add("Get Discount with 5 people");
            notificationTitle.Add("Get Discount with 5 people");

            notificationDiscription.Add("Ride With RoadWheels will make you feel ride in paradise explore more nature is beautifull ");
            notificationDiscription.Add("Ride With RoadWheels will make you feel ride in paradise explore more nature is beautifull ");
            notificationDiscription.Add("Ride With RoadWheels will make you feel ride in paradise explore more nature is beautifull ");
            notificationDiscription.Add("Ride With RoadWheels will make you feel ride in paradise explore more nature is beautifull ");
            notificationDiscription.Add("Ride With RoadWheels will make you feel ride in paradise explore more nature is beautifull ");
            notificationDiscription.Add("Ride With RoadWheels will make you feel ride in paradise explore more nature is beautifull ");
            notificationDiscription.Add("Ride With RoadWheels will make you feel ride in paradise explore more nature is beautifull ");
            notificationDiscription.Add("Ride With RoadWheels will make you feel ride in paradise explore more nature is beautifull ");
            notificationDiscription.Add("Ride With RoadWheels will make you feel ride in paradise explore more nature is beautifull ");
            notificationDiscription.Add("Ride With RoadWheels will make you feel ride in paradise explore more nature is beautifull ");
            notificationDiscription.Add("Ride With RoadWheels will make you feel ride in paradise explore more nature is beautifull ");

            NotificationListAdapter adapter = new NotificationListAdapter(this.Context, notificationImage, notificationTitle, notificationDate, notificationDiscription);

            notificationListRecycle.SetAdapter(adapter);

            adapter.ItemClick += Adapter_ItemClick;

            return(itemView);
        }