I'm creating an app that requires pixel art to be displayed from the web.
On iOS, I can set a UIImageView to have it's magnification filter to
imageView.layer.magnificationFilter = kCAFilterNearest
And everything takes care of itself.
However I cannot seem to do anything about this in Android. How would I change the magnification method of the images that I can hand to Android's imageView?
This is done via the BitmapDrawable
's Paint
, rather than the view, using setFilterBitmap():
myBitmapDrawable.getPaint().setFilterBitmap(false);
myImageView.setImageDrawable(myBitmapDrawable);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With