Android widget that displays an arbitrary image or drawable, such as an icon.
Questions tagged [imageview]
9865 questions
28
votes
1 answer
android:set gray scale filter to imageView
i use this library to show svg image on imageView , i want to show locked and unlocked mode with this imageView, when state is locked show imageView in grayscale color filter.
something like this code on css :
-webkit-filter:…

mahdi
- 16,257
- 15
- 52
- 73
28
votes
2 answers
How to Make an ImageView in Circular Shape?
I want to do something like that.
This is a list view row with name and the image of user.
I have done some searching and have done the image circular,but not the perfect solution.
Any help will be helping me.
my code added to the Image Loader…

shailesh
- 1,783
- 2
- 17
- 26
28
votes
2 answers
Having issue on Real Device using vector image in android. SVG-android
I use svg-android.jar from https://github.com/pents90/svg-android at its work fine but only on emulator devices in eclipse. Agrrrr. On real devices it just empty imageView on screen.
here is my code:
SVG svg =…

Ivan Podhornyi
- 779
- 3
- 7
- 17
28
votes
5 answers
Android ImageView setImageResource in code
I have an imageView that I want to display a little icon of the country that you are currently in. I can get the country code, but problem is I can't dynamically change the imageView resource. My image files are all lowercase (Example: country…

rel-s
- 6,108
- 11
- 38
- 50
27
votes
1 answer
How to crop Bitmap Center like imageview?
Possible Duplicate:
How to crop the parsed image in android?
How does one crop the same way as Androids ImageView is doing
android:scaleType="centerCrop"

ericlee
- 2,703
- 11
- 43
- 68
27
votes
4 answers
What is the difference between ImageView.setBackgroundResource and ImageView.setImageResource?
I have seen these different approaches in setting images but I don't get the difference.
Why there two methods?

Lukap
- 31,523
- 64
- 157
- 244
27
votes
1 answer
how to set the bitmap to the ImageView in main.xml captured from the camera?
I have a Imageview in main.xml, how to set the bitmap the to the imageView in main.xml
i can assign bitmap to the local image view in the below code.
//Activates the Camera
Intent intent = new…

Srikanth Naidu
- 787
- 5
- 16
- 28
27
votes
6 answers
Android convert base64 encoded string into image view
I want to convert base64 encoded string into bitmap so i can put it in image view, but getting error like
D/skia(7490): --- decoder->decode returned false and bitmap returns null value
My code is:
byte[] imageAsBytes =…

Baskar
- 549
- 2
- 6
- 12
25
votes
4 answers
OutOfMemoryError: Using a image which is 1080*1920 do the splash page
I want to implement a splash page in my android app. So in the layout xml, there is a imageView and the image file is a png file which is 1080*1920, when a run the app, it occur a OutOfMemoryError error, how can I fix that?
The XML file:

user2655973
- 315
- 3
- 13
25
votes
7 answers
How to make an image fit into a circular frame in android
I have a ListView in which there is an ImageView, the image in the ImageView gets loaded dynamically after its fetched from the server.
Now, I want these images, of any size, to fit into a circular frame, how to do that?
Here's a sample pic of what…

Sanghita
- 1,307
- 3
- 16
- 28
24
votes
3 answers
Android: can't remove vertical gap between images in LinearLayout
I have a simple LinearLayout in Android with two images vertically:

Enrico Detoma
- 3,159
- 3
- 37
- 53
24
votes
2 answers
Android - Canvas Black when using Flood-Fill
When I implement my flood-fill class it turns my entire Bitmap black. Obviously this is not the desired effect. I've looked at the following threads:
https://stackoverflow.com/questions/24030858/flood-fill-is-coloring-my-entire-screen
Flood Fill…

Jawascript
- 683
- 1
- 7
- 23
24
votes
9 answers
How do I make android imageview square?
I'm using an ImageView in an Android project.
Width: match_parent
Height: wrap_content
then I scale it to fill_XY, but the image is not square yet... what can I do?
user1525984
24
votes
7 answers
View Pager + ImageView +Pinch Zoom + Rotation
I want to implement Pinch Zoom on Imageview, with in View Pager similar to Default Android Gallery. I have found multiple source over GitHub, But the zoom and sliding just work for only first image.
What I have tried:
1.) TouchImageView
2.)…

Avtar Guleria
- 2,126
- 3
- 21
- 33
24
votes
5 answers
Multiple animations on 1 imageview android
I have 2 animations which are already working,
i want to fade my train + tween my train on the same time.
If I execute 1 of these lines it works.
But if I try to execute both it, only 1 will work..
I really can't find a solution here.
Maybe you can…

RobinHo
- 565
- 1
- 9
- 24