Questions tagged [imageview]

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

9865 questions
2
votes
0 answers

Viewflipper images not change on using dynamic data

I am working on ad banner and i want to flip image after 4 sec in the banner layout so for that i am using viewflipper. I want to show images taken from web service so i am parsing image from web service and create list of it but when pass that list…
2
votes
1 answer

ConstraintLayout Ratio binding has width but not height

I am trying to dynamically set the ratio of 2 ImageViews using databinding. If a flag is true, the second ImageView's (B) visibility is set to gone and the first (A) should display in 16:9 format and expand to fill the width of the parent. If both…
2
votes
0 answers

How to set multiple images from gallery to imageViews in Android?

I can select multiple images from gallery, but when I try to set them, these images aren't sorted correctly in my Imageviews. I want the first selected image the be placed in first ImageView, so on. How can I sort these images ? @Override protected…
Mehmet Gür
  • 503
  • 7
  • 20
2
votes
3 answers

Android: Orientation changes erase modifications made to my ImageView

I have app in which I have ImageView. I open new activity, where I paint something by finger and this bitmap return to my ImageView. everything is ok but when I change orientation now, my activity with ImageView is repaint or restart and imageview…
jerry2007
  • 21
  • 1
  • 2
2
votes
1 answer

Rotated ImageView edges are not smooth (jagged)

Sample NG ImageView: NG Rotated ImageView In iOS, i can easily solve this jagged-edges-problem by view.layer.allowsEdgeAntialiasing = true. What is the best way to solve this in Android? What I already tried: I referred to this post Bitmap not…
ghostcat47
  • 21
  • 8
2
votes
1 answer

Android: ImageView.ScaleType but for Buttons and/or RadioButtons

I like to use a customized (Radio)Button and I know I can use whatever image for the background with the following code inside the xml: However: I want to use three radiobuttons, that fill…
Pascal Klein
  • 23,665
  • 24
  • 82
  • 119
2
votes
2 answers

ImageView can not be resized using the layout weight

I want to divide my screen into 3 vertically equal parts and add an ImageView to the top part. When I add the image, the parts won't be equal. It can not be changed using layout weight.
shayanmalinda
  • 1,925
  • 3
  • 12
  • 23
2
votes
2 answers

Android listview imageview in listitem gets hidden on scroll

I am having this weird problem when trying to dynamically set visibility and image drawable of imageview in list item. When it initially loads its shows up completely fine but when I scroll it up or down some of the images doesn't show up. Here is…
Parashar
  • 85
  • 1
  • 8
2
votes
4 answers

Add image dynamically

I trying to add image into LinearLayout (linearForImage) dynamically, but it doesn't work. val image = ImageView(activity) image.setLayoutParams(LinearLayout.LayoutParams(80, 60)) for (i in 1..5){ …
John Joe
  • 12,412
  • 16
  • 70
  • 135
2
votes
1 answer

Stack ImageView on top of surface where camera preview is running?

I'm trying to display an image on top of a surface where a camera preview is running. So far I have the camera running using a SurfaceHolder. I thought maybe I could use a FrameLayout to stack an image on top of the camera preview, but I don't know…
Shubham
  • 949
  • 6
  • 21
  • 29
2
votes
1 answer

Indeterminate Number of Falling Images...Display on SurfaceView HELP!

I think I have hit a coders block here. I am writing a game where multiples images will fall from the top of the screen and you have to catch them at the bottom. There will be an indeterminate number of images, so you don't know how many there will…
Hani Honey
  • 2,101
  • 11
  • 48
  • 76
2
votes
1 answer

Display image using ImageView in ARCore

I am trying to display a 2D PNG image in ARCore, but nothing is being displayed. The rendering of a 3D object works perfectly when I try to render using ModelRenderable. So there is something I am doing wrong when trying to render an image using…
Bhavik Shah
  • 95
  • 1
  • 11
2
votes
2 answers

setImageURI / setimagebitmap to fetch image from net and display in image view

I want to fetch image from net from some URL and show it in my ImageView. following is the code i am using :- Bitmap bm = null; try { URL aURL = new URL("stringURL"); URLConnection conn = aURL.openConnection(); …
abhishek
  • 1,434
  • 7
  • 39
  • 71
2
votes
0 answers

Android onStop() called late while animation is in progress in back stack activity

Android onStop() not called too late after finish Activity B. + It works fine under Android 7.0 Nougat. If Animation is started from onResume and canceled from onPause, it works fine. But I wonder why. Log below Activity B : onPause Activity A :…
msmsmsms
  • 43
  • 5
2
votes
4 answers

ImageView not shown inside custom row for listview

I have a xml file for layout of each row of listview. I have 3 columns. In first column the imageview doesn't show, only the text below it. This is my row.xml:
DixieFlatline
  • 7,895
  • 24
  • 95
  • 147