public MainRecyclerViewTouchCallback(Context context, MainRecyclerView recyclerView) : base(0, ItemTouchHelper.Left | ItemTouchHelper.Right) { this.recyclerView = recyclerView; backgrounds = new[] { Resource.Color.playButtonRed, Resource.Color.playButtonGreen } .Select(res => new Color(ContextCompat.GetColor(context, res))) .Select(color => new ColorDrawable(color)) .ToArray(); textMargin = 16.DpToPixels(context); textPaint.Color = Color.White; textPaint.TextAlign = Paint.Align.Left; textPaint.TextSize = 15.SpToPixels(context); textPaint.SetTypeface(Typeface.Create("sans-serif-medium", TypefaceStyle.Normal)); deleteTextWidth = (int)textPaint.MeasureText(Delete); }
public MainRecyclerViewTouchCallback(Context context, MainRecyclerView recyclerView) : base(0, ItemTouchHelper.Left | ItemTouchHelper.Right) { this.recyclerView = recyclerView; }