How do I only show a certain about of a bitmap in an ImageView?

Go To StackoverFlow.com

2

This is for Android. I need to display a bitmap that is like a progress meter. I wish to display the first x amount of pixels from left to right. I don't want to scale the image down, I want to do something more like cropping. I know that I can reduce the size of the Bitmap programmatically but was hoping for a more elegant solution.

2012-04-04 01:33
by Steve Chepurny
It might be possible to load & paint the entire image, then simply draw the 'white out' part of the progress bar on top of that - Andrew Thompson 2012-04-04 01:36


1

I think this might help How to make a progress bar use an image to show progress instead of using a color in Android

Also user- citizen conn posted his github solution for something similar, have a look at his link https://gist.github.com/5c08cd2e99b1b572b497/83a00627dc68862b2c25aa27fc1ad346ad41ac6e

2012-04-04 02:21
by Sartaj
Ads