public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            View rootView = inflater.Inflate(Resource.Layout.fragment_list_view_example, container, false);

            this.listView = (RadListView) rootView.FindViewById(Resource.Id.listView).JavaCast<RadListView>();

            ArrayList dataSource = new ArrayList();

            EmailMessage message = new EmailMessage();
            message.title = "Tech news";
            message.content = "Here is your daily LinkedIn feed with news about .NET, Java, iOS and more...";
            dataSource.Add(message);

            message = new EmailMessage();
            message.title = "Awaiting Payment";
            message.content = "Monthly bills summary: water supply, electricity, earth gas...";
            dataSource.Add(message);

            message = new EmailMessage();
            message.title = "Greetings from Hawai";
            message.content = "Hey Betty, we've just arrived! What a flight!...";
            dataSource.Add(message);

            this.listView.SetAdapter(new SwipeToExecuteListViewAdapter(dataSource));

            seb = new SwipeExecuteBehavior();

            seb.AddListener(this);

            this.listView.AddBehavior(seb);

            return rootView;
        }
 private void toggleAction1(EmailMessage message)
 {
     //Archive message
     Toast.MakeText(this.Activity, "Message archived", ToastLength.Short).Show();
 }
 private void toggleAction2(EmailMessage message)
 {
     //Delete message
     Toast.MakeText(this.Activity, "Message deleted", ToastLength.Short).Show();
 }
Ejemplo n.º 4
0
        public override void OnBindSwipeContentHolder(ListViewHolder viewHolder, int position)
        {
            View swipeContent = viewHolder.ItemView;

            EmailMessage currentDataItem = (EmailMessage)this.GetItem(position);
        }