Questions tagged [imageview]

Android widget that displays an arbitrary image or drawable, such as an icon.

9865 questions
32
votes
4 answers

Android: How can I stop an infinite animation applied on an ImageView?

I have an ImageView on which I have applied a rotate animation. Since I want the rotation to go on continuously, I gave the repeatCount as infinite in my rotate.xml: android:repeatCount="infinite" In onCreate(), I load the animation and start…
kiki
  • 13,627
  • 17
  • 49
  • 62
32
votes
4 answers

ImageView ScaleType ignores padding

I have a Imageview set with a white background and 1dp padding, this creates a border-like effect, which is the wanted result. Now if I set the scaleType to centerCrop it ignores the padding on the top and bottom. So I still have my border on the…
TheLD
  • 2,211
  • 4
  • 21
  • 26
31
votes
2 answers

How to get the height and width of an ImageView/Bitmap in Android

I want to get the height and width of an image bitmap that is either in ImageView or a background image. Please help me, any help will be appreciated.
abhishek ameta
  • 2,326
  • 7
  • 28
  • 35
31
votes
11 answers

how to set image from url for imageView

I wanna set Image in ImageView using Url for example I have this url…
Shanaz K
  • 678
  • 2
  • 13
  • 28
30
votes
8 answers

cell imageView in UITableView doesn't appear until selected

Here is a video of the problem: http://youtu.be/Jid0PO2HgcU I have a problem when trying to set the image for the [cell imageView] in a UITableView from the asset library. The image is loaded but it doesn't appear in the cell until I touch…
Ali
  • 4,205
  • 4
  • 25
  • 40
30
votes
7 answers

android imageView: setting drag and pinch zoom parameters

I am currently developing for Android (my first app) an application which lets users see the subway map and be able to pinch zoom and drag around. I am currently modifying the code found in Hello Android, 3rd Edition and got the pinch zooming and…
w1ck3d64
  • 402
  • 2
  • 8
  • 15
30
votes
3 answers

Imageview set color filter to gradient

I have a white image that I'd like to color with a gradient. Instead of generating a bunch of images each colored with a specific gradient, I'd like to do this in code (not xml). To change an image's color, I use…
Malfunction
  • 1,324
  • 4
  • 15
  • 25
30
votes
7 answers

How can we set height and width dp for imageview in android?

I would like to set height and width in dp for ImageView in android pragmatically. How can I achieve this?
Karthik
  • 4,943
  • 19
  • 53
  • 86
29
votes
5 answers

Displaying YUV Image in Android

In my application, we need to display the Video frame receives from server to our android application, Server is sending video data @ 50 frame per second, having encoded in WebM i.e. using libvpx to encode and decode the images, Now after decoding…
Amitg2k12
  • 3,765
  • 10
  • 48
  • 97
29
votes
6 answers

Dynamically change SVG image color in android

I know that using third party library, it is possible to use SVG image in Android. Library like: svg-android The code to load SVG image is like below: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //…
Shreyash Mahajan
  • 23,386
  • 35
  • 116
  • 188
29
votes
3 answers

android:select image from gallery then crop that and show in an imageview

i really need this code and i searched for 3 hours on internet but i couldn't find a complete and simple code and i tested many codes but some didn't work and others wasn't good,please help me with a full and simple code,thank you edit:i have this…
user3648435
  • 471
  • 1
  • 4
  • 18
29
votes
4 answers

android imageview onClick animation

I guess this is kind of an odd question but I have tried setting onClicklistener on an ImageView and it has worked. But the problem is that the user cannot sense the click. I mean if some of u have worked on other mobile environs(like Apple iPhone)…
JaVadid
  • 7,107
  • 13
  • 42
  • 54
29
votes
9 answers

How to give hexagon shape to ImageView

How to give hexagon shape to ImageView . Is it possible to do in same way ? If so then how. If this is not possible through this then how this could be achieved ?
N Sharma
  • 33,489
  • 95
  • 256
  • 444
29
votes
6 answers

Android - ImageView bottomCrop instead of centerCrop

I'm trying to position an ImageView so that the bottom of the image is always pinned to the bottom of the view, no matter how small the height of the ImageView is. However, none of the scale types seem to fit what I am trying to do. CenterCrop is…
Jpoliachik
  • 2,558
  • 2
  • 24
  • 23
28
votes
9 answers

Android: Scrolling an Imageview

I have an ImageView that is twice the height of a normale screen ( 960 dip). I would like to scroll it nicely up and down on the screen. The bottom of the screen should contain a button. I have tried various combinations of ScrollView and Imageviews…
luca
  • 369
  • 1
  • 5
  • 7