Step # 1: Create a PNG file (or possibly ShapeDrawable ) that is your scan panel, with the appropriate transparency as you see fit.
Step # 2: add an ImageView to your RelativeLayout that contains the image from step # 1, it may have android:visible="gone" from the start. Make sure the ImageView is a later child of the RelativeLayout than your ImageView that you are scanning, so it will be displayed on top.
Step # 3: Use TranslateAnimation to animate ImageView from step # 2 (after being visible) with whatever template you want.
Step # 4: When the animation is complete (through the AnimationListener ), do an ImageView again to return you to the state you were in before the animation started.
CommonsWare
source share