agnaldonp / previewimagecollection Goto Github PK
View Code? Open in Web Editor NEWA library to make a mosaic with a preview of multiple images
A library to make a mosaic with a preview of multiple images
I really like this way of displaying and want to use it my own app but I don't know Kotlin. If there's any chance of a simple Java sample instead of Kotlin I'd be really grateful. I just can't seem to get this bit into Java:
collectionView.addImage(BitmapFactory.decodeResource(resources, R.drawable.landscape_08),
object : ImageCollectionView.OnImageClickListener {
override fun onClick(bitmap: Bitmap, imageView: ImageView) {
Toast.makeText(imageView.context, "Test Click image 08", Toast.LENGTH_LONG)
.show()
}
}
)
I think you should replace HashMap<BitMap, Image> by HashMap<URL, Image>.
Then you can use Glide to load BitMap from URL.
Because When I have 10 Image to preview and i limit to show only 4 (+6 morer). I still have to add 10 Bitmap to but it just need 4 BitMap to enough to show. This thing may make OOM when I have many PreviewImageCollection like NewsFeed facebook.
If I use 10 URL it just 10 String and it does not occupy memory
Ps: My English so bad...wish you sympathize...Thank you
I have multiple jpg images that I decode to bitmaps like BitmapFactory.decodeFile(file.getPath());
before loading them into the gallery via imageCollectionView.addImage(bitmap, null, new OnImageLongClickListener...);
. So far so good.
Now I want to delete a specific picture, not only remove the bitmap from the gallery. I want to delete the source file (see above file.getPath()
) inside a OnImageLongClickListener
.
However, I am missing a reference to the file. Is it possible to reference a jpg file loaded into the Gallery backwards?
Hello,
I see that the image view has scaleType of CenterCrop, so how to change the scale type of imageview?
Thanks
i was trying to use it as part of a recycler view but at has end up that the whole recycler view should scrol up
Library is good its not support images which we comes from server
distributeEvenly boolean : true?false may have private access
The lib probably imports stuff that is not needed, only the lib increases the apk size of 8 MB
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.