I am using a Drag and Drop event, and I want to change the drag shadow's opacity. I extended View.DragShadowBuilder class but I'm not able to set drag shadow's opacity. By default, it's semi transparent. I want it to look solid with no transparency. I do this:
@Override
public void onDrawShadow(Canvas canvas) {
ImageView ivPiece = (ImageView) getView();
BitmapDrawable drawable = (BitmapDrawable) ivPiece.getDrawable();
Bitmap piece = drawable.getBitmap();
Paint paint = new Paint();
paint.setAlpha(255);
paint.setAntiAlias(true);
canvas.drawBitmap(piece, 0, 0, paint);
}
But it doesn't work.