protected override View GetCellCore(Cell item, View convertView, ViewGroup parent, Context context)
 {
     _cell              = base.GetCellCore(item, convertView, parent, context);
     _isSelected        = false;
     _defaultBackground = _cell.Background;
     return(_cell);
 }
Ejemplo n.º 2
0
 protected override void OnAttached()
 {
     _view               = Control ?? Container;
     _view.Clickable     = true;
     _view.LongClickable = true;
     _view.Touch        += ViewOnTouch;
 }
Ejemplo n.º 3
0
 protected override View GetCellCore(Cell item, View convertView, ViewGroup parent, Context context)
 {
     _cellCore             = base.GetCellCore(item, convertView, parent, context);
     _selected             = false;
     _unselectedBackground = _cellCore.Background;
     return(_cellCore);
 }
Ejemplo n.º 4
0
        protected override void OnAttached()
        {
            _view = Control ?? Container;

            _view.Click     += ViewOnClick;
            _view.LongClick += ViewOnLongClick;
        }
        public Android.Graphics.Bitmap BitmapFromView(Android.Views.View nativeView)
        {
            Android.Graphics.Bitmap bitmap = Android.Graphics.Bitmap.CreateBitmap(nativeView.Width, nativeView.Height, Android.Graphics.Bitmap.Config.Argb8888);

            Android.Graphics.Canvas canvas = new Android.Graphics.Canvas(bitmap);

            nativeView.Draw(canvas);

            canvas.Dispose();

            return(bitmap);
        }
Ejemplo n.º 6
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void _surfaceView_Touch(object sender, View.TouchEventArgs e)
        {
            float x    = e.Event.GetX();
            float y    = e.Event.GetY();
            float RawX = e.Event.RawX;
            float RawY = e.Event.RawY;

            if (x > 100 && x < 500 && y > 100 & y < 500)
            {
                Draw(x, y);
            }
            Android.Views.View touchedView = sender as View;                    // что тут происходит?? приводим sender к типу View??
        }
Ejemplo n.º 7
0
        protected override Android.Views.View GetCellCore(Cell item, Android.Views.View convertView, ViewGroup parent, Context context)
        {
            var cell     = base.GetCellCore(item, convertView, parent, context);
            var listView = parent as Android.Widget.ListView;

            if (listView != null)
            {
                // Disable native cell selection color style
                listView.SetSelector(Android.Resource.Color.Transparent);
                listView.CacheColorHint = Android.Graphics.Color.Transparent;
            }

            return(cell);
        }
 public override void GetOutline(Android.Views.View view, Outline outline)
 {
     outline?.SetRoundRect(0, 0, view.Width, view.Height, _radius);
 }