Example #1
0
        public ItemTouchHelperCallback(IItemTouchHelperAdapter adapter)
        {
            mAdapter = adapter;

            deleteIcon       = ContextCompat.GetDrawable(App.Context, Resource.Drawable.ic_delete_white_24dp);
            deleteBackground = new ColorDrawable(new Color(ContextCompat.GetColor(App.Context, Resource.Color.bg_swipe_delete)));
            iconMargin       = (int)App.Context.Resources.GetDimension(Resource.Dimension.delete_icon_margin);
        }
        public SimpleItemTouchHelperCallback(IItemTouchHelperAdapter adapter)
        {
            _adapter = adapter;
            var algo = Mvx.IoCProvider.Resolve <IMvxAndroidCurrentTopActivity>();

            _context = algo.Activity;

            _rightToLefIcon = ContextCompat.GetDrawable(_context, Resource.Drawable.ic_delete_black_24dp);
            _rightButton    = new Button(_context);
            //_rightButton.SetBackgroundColor(Color.Transparent);
            _rightButton.Text      = "Delete";
            _rightToLeftbackground = new ColorDrawable(Color.Red);

            _leftToRightIcon   = ContextCompat.GetDrawable(_context, Resource.Drawable.ic_done_black_24dp);
            _leftButton        = new Button(_context);
            _leftButton.Click += (sender, args) => System.Diagnostics.Debug.WriteLine("Click on the left button");
            _leftButton.SetBackgroundColor(Color.Green);
            _leftButton.Text       = "Complete";
            _leftToRightBackground = new ColorDrawable(Color.ParseColor("#0582ff"));
        }
 public ItemTouchHelperCallback(IItemTouchHelperAdapter Adapter)
 {
     _adapter = Adapter;
 }
 public SimpleItemTouchHelperCallback(IItemTouchHelperAdapter adapter)
 {
     mAdapter = adapter;
 }
 public SimpleItemTouchHelperCallback(IItemTouchHelperAdapter adapter)
 {
     mAdapter = adapter;
 }
 public void SetAdapter(IItemTouchHelperAdapter adapter)
 {
     _adapter = adapter;
 }
Example #7
0
 public ContactsListCallBacks(IItemTouchHelperAdapter adapter, IContactsListSwipe swipeListener)
 {
     _adapter       = adapter;
     _swipeListener = swipeListener;
 }
 public ContactsListCallBacks(IItemTouchHelperAdapter adapter, IContactsListSwipe swipeListener)
 {
     _adapter = adapter;
     _swipeListener = swipeListener;
 }