Abhishek Dewan
05/13/2021, 5:03 PMonChildDraw
method for a ItemTouchHelper.SimpleCallback
class. My question is how does one write an espresso test to ensure that something that was suppose to be drawn on the canvas get’s drawn. I’ve already gotten to the point where I can make the espresso test do the swipe however, not sure how to correct make a view assertion. Any help would be appreciated.
c.drawRect(
itemView.left.toFloat(),
itemView.top.toFloat(),
itemView.left.toFloat() + dX,
itemView.bottom.toFloat(),
paint
)
c.drawBitmap(
actionBitmap,
itemView.left.toFloat() + bitmapWidth + 96f,
itemView.top.toFloat() + backgroundHeight,
null
)