OverlappingImageView

Additional

Language
Java
Version
N/A
Created
Apr 8, 2016
Updated
Aug 12, 2018
Owner
davidHarush
Contributor
davidHarush
1
Activity
Badge
Generate
Download
Source code
APK file

Announcement

Overlappingimageview

Simple custom ImageView for android

Imageview with 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.




exmple for drawble mask draw in front of the image:
 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);

Download the sample app form Google Play:


OverlappingImageView mImg1 = ((OverlappingImageView) findViewById(R.id.imageView1)); mImg1.setMaskShape(R.drawable.mask_shape); mImg1.setDrawOnFront(true);

Code examples:

How to use: all you need to do is to copy OverLappingImageView.java to your project and start using it.