private void FlyImages_Click(object sender, EventArgs e)
        {
            bool isSelected  = FListView.IsSelectedItem(Position);
            var  setRightOut = (AnimatorSet)AnimatorInflater.LoadAnimator(Context, Resource.Animator.right_out);
            var  setLeftIn   = (AnimatorSet)AnimatorInflater.LoadAnimator(Context, Resource.Animator.left_in);

            if (!isSelected)
            {
                setRightOut.SetTarget(ImgUser);
                setLeftIn.SetTarget(ImgBack);
                setRightOut.Start();
                setLeftIn.Start();
                //this.SetBackgroundColor(Android.Graphics.Color.AliceBlue);
                FListView.MarkItemAsSelected(Position, true);
            }
            else
            {
                setRightOut.SetTarget(ImgBack);
                setLeftIn.SetTarget(ImgUser);
                setRightOut.Start();
                setLeftIn.Start();
                //this.SetBackgroundColor(Android.Graphics.Color.White);
                FListView.MarkItemAsSelected(Position, false);
            }

            FListView.UpdateActionModeDroid();
        }
Exemple #2
0
        public void OnItemCheckedStateChanged(ActionMode mode, int position, long id, bool @checked)
        {
            // Here you can do something when items are selected/de-selected,
            // such as update the title in the CAB
            FListView.MarkItemAsSelected(position - 1, @checked);

            if (FListView.GetItemsSelectedCount() > 0)
            {
                mode.Title = $"{FListView.GetItemsSelectedCount()} seleccionados";
            }
            else
            {
                mode.Finish();
            }
        }
Exemple #3
0
        private void NativeListView_ItemLongClick(object sender, AdapterView.ItemLongClickEventArgs e)
        {
            if (fListView.GetItemsSelectedCount() > 0)
            {
                if (ActionMode == null)
                {
                    ActionMode = ((Activity)Context).StartActionMode(CreateActionMode());
                }
            }
            else
            {
                ActionMode = ((Activity)Context).StartActionMode(CreateActionMode());
                fListView.MarkItemAsSelected(e.Position - 1, true);
                //nativeListView.SetItemChecked(e.Position, true);
            }

            UpdateActionModeTitle();
        }
Exemple #4
0
 public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
 {
     //base.RowSelected(tableView, indexPath);
     FListView.MarkItemAsSelected(indexPath.Row, true);
 }