Overlappingimageview
Simple custom ImageView for android
I made this project in order to achieve a simple way to enable overlapping of two images one over the other.
This project helped me build a gallery with multiple selection modes.
You can use a Drawable or xml shape in front of or behind the regular ImageView resource.
The Drawable will resize according to the ImageView size.
How to use: all you need to do is to copy OverLappingImageView.java to your project and start using it.
Code examples:
exmple for drawble mask draw in front of the image:
OverlappingImageView mImg1 = ((OverlappingImageView) findViewById(R.id.imageView1));
mImg1.setMaskShape(R.drawable.mask_shape);
mImg1.setDrawOnFront(true);
exmple for drawble mask draw behind of the image:
OverlappingImageView mImg2 = ((OverlappingImageView) findViewById(R.id.imageView2))
.setMaskShape(android.R.drawable.picture_frame)
.setDrawOnFront(false);
after init you can use:
mImg2.toggleMask();
or
mImg2.showMask(true);