We want to give our jigsaw pieces a shadow when we pick them up, which will cast over the rest of the board until we put it down. We also want our shadow to raise and lower along with the animation.
Our jigsaw pieces are rectangular, which means that their shadows will also be rectangles. We will simply implement our shading technique by putting a black square behind our image, with a little bit of transparency and a slight offset between the image and the shadow.
Because we have already created a "depth" abstraction for making 3D moves, this should be easy to do in a nice smooth way.
RaisableImageView.java. This is where we'll be making all of our changes. First, we need to add a few more imports ...