Android widget that displays an arbitrary image or drawable, such as an icon.
Questions tagged [imageview]
9865 questions
45
votes
6 answers
Resize images with Glide in a ImageView Android
I have a lot of doubts about the treatment of the images in android, and I was hoping to see if you could solve them.
At this point I have an image that occupies 320 dp high, and match_parent width, which is around 60% of the screen.
This image of…

Traif
- 671
- 2
- 6
- 12
44
votes
3 answers
Getting black ImageView using Picasso and Glide
The problem
I'm writing an Android app that's supposed to have a "Slideshow" feature on it. I've found this nice library, based on Picasso, that does exactly what I wanted, and it worked just fine most of the times.
Problem is, sometimes my images…

Mauker
- 11,237
- 7
- 58
- 76
44
votes
10 answers
How to show imageView full screen on imageView click?
I am getting images from url and showing it on the imageView. This functionality is working properly. But I want that when I click on that image, then it must be full screen. So how to achieve this functionality? I know I am missing something.…

Amit Jayaswal
- 1,725
- 2
- 19
- 36
43
votes
7 answers
Android: how to convert whole ImageView to Bitmap?
I have my application that is displaying images with different ratio, resized inside (centerInside) imageView. What I need is to create bitmap from the ImageView including the background (black in this case).
So for example I have device screen…

yosh
- 3,245
- 7
- 55
- 84
43
votes
7 answers
Make ImageView with Round Corner Using picasso
I know there are lots of link available to make ImageView Round Corner.
But I'm Using Picasso Library for Image Loading..
I refer the link to get result.
But the Problem is that I'm Using it in ListView and for the LIstView's first item ImageView…

Akshay
- 6,029
- 7
- 40
- 59
42
votes
5 answers
Android - ImageView: setImageBitmap VS setImageDrawable
What is the difference between setImageBitmap and setImageDrawable?
I have an image which I would like to set dynamically from file. The tutorial that I followed says to convert my Bitmap to a BitmapDrawable then set it using setImageDrawable. I've…

meeeee
- 2,929
- 3
- 22
- 25
41
votes
5 answers
ImageView adjustViewBounds not working
I have an ImageView with android:layout_width=100dp, android:layout_height=wrap_content and android:adjustViewBounds=true
It's source is a 50 x 50 px picture. But the aspect ratio is not preserved - height of the ImageView is 50px, not 100px (i.e.…

fhucho
- 34,062
- 40
- 136
- 186
41
votes
5 answers
Android: Drawing a canvas to an ImageView
I'm new to android programming and what I'm trying to figure out is this;
In my layout i have a TextView, ImageView, and Button, all on a vertically oriented LinearLayout.
I want to be able to dynamically draw circles in the ImageView, without…

sil
- 463
- 2
- 5
- 5
41
votes
6 answers
Resizing images to fit the parent node
How do I get an image in an ImageView to automatically resize such that it always fits the parent node?
Here is a small code example:
@Override
public void start(Stage stage) throws Exception {
BorderPane pane = new BorderPane();
ImageView…

rbs
- 1,087
- 2
- 17
- 24
40
votes
8 answers
Android Flip ImageView Vertically
I am trying to flip and ImageView vertically but it just won't work.
Java:
public static void flipImageVertically(final Bitmap bmp, final ImageView imageView) {
final Matrix matrix = new Matrix();
matrix.preScale(1.0f, -1.0f);
…

Subby
- 5,370
- 15
- 70
- 125
39
votes
32 answers
Android ImageView Is Not Displaying Image?
Can anyone tell me why the following code is not working? The Image does not appear at all.

comead
- 577
- 2
- 13
- 29
39
votes
5 answers
Android Drop Shadow on View
I have done some extensive searching for code examples on this but cannot find anything.
In particular, I am looking to add a shadow to a png drawable I am using in an ImageView. This png drawable is a rounded rect with transparent corners.
Can…

coneybeare
- 33,113
- 21
- 131
- 183
38
votes
11 answers
Glide not updating image android of same url?
I have the same url for an image. When I update this image more than one time it shows the previous image. The image and picture version on the server is updated but Glide is not showing the new image.I want to get new image every time and cache it…

Usman Saeed
- 843
- 3
- 9
- 21
38
votes
8 answers
Elevation not working for ImageView
Elevation for ImageView is not working. I declared ImageView in XML like this:

Karthik
- 381
- 1
- 3
- 3
38
votes
5 answers
How to Set BackgroundColor on ImageView on Android?
I tried a couple things and nothing is working... I'm trying to change the BackgroundColor on a ImageView on Android, but nothing happens...
Here is my xml:

CarinaPilar
- 1,054
- 2
- 13
- 20