Questions tagged [imageview]

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

9865 questions
2
votes
0 answers

ImageView SharedElement Resized Before Transition

I have a MainActivity holding 2 fragments - MainFragment and SlideshowFragment. Both fragments are using ViewPager with FragmentStatePagerAdapter to hold childFragments. When an ImageView in ChildFragmentA of MainFragment is clicked, it is to expand…
tingyik90
  • 1,641
  • 14
  • 23
2
votes
1 answer

I try to create a bitmap from a YUV Image, but the image looks distorted (has green and pink overlay)

This is the function that I use: public void vidyoConferenceFrameReceivedCallback(final int participantId, final int width, final int height, final byte[] rawImageBytes) { if (selfView == null || selfView.getVisibility() == View.GONE) …
rosu alin
  • 5,674
  • 11
  • 69
  • 150
2
votes
0 answers

Setting ImageViews without blocking the UI thread by caching Bitmaps

Introduction This is going to be a long one. I spent most of my weekend trying different approaches and am putting this up to hopefully help others with similar issues. I don’t have high hopes to find a perfect solution that solves everything, but…
Johis
  • 256
  • 2
  • 9
2
votes
0 answers

Controlling status bar in opencv image show

I'm using opencv with python 2.7. I have a question about image display. When displaying an image in python/cv2, the status bar normally shows the pixel values when hovering with the cursor. For example, the following code will display the below…
Roee
  • 93
  • 10
2
votes
3 answers

How to change an ImageView with a filename

I have a string with the name of the file that I want (R.drawable.square) to put in the imageview. String shape = "square" I am trying to use the method below to show the image imageView.setImageResource() Hardcoding the filename in works but I…
Rory Harrison
  • 117
  • 10
2
votes
2 answers

Background ImageView is not Shown in API level 16 though working good in API 19

I am not able to find out the exact issue that why the image(background) is not visible in API level 16 but it is showing good in API level 19. I have worked simply as i have done previously but , this time the background is not shown(of WaterMark…
seon
  • 1,050
  • 2
  • 13
  • 27
2
votes
3 answers

How can I take singleRequest model by Glide?

I can load image path to imageView using Glide in this code: GlideApp.with(context) .load(imagePath) .diskCacheStrategy(DiskCacheStrategy.ALL) .transition(withCrossFade()) …
propoLis
  • 1,229
  • 1
  • 14
  • 48
2
votes
2 answers

ImageView onClick need to click twice to perform an action

I have set up CardView in my app.The card has ImageView on it.I have set up onClickListener on ImageView. But action is performed after clicking twice the ImageView. This is code for CardView:
Sam
  • 39
  • 7
2
votes
2 answers

Picking images from gallery (SD Card) on my app… ¿How to allow only max 500kb photos?

WHAT I HAVE DONE NOW: i am picking images on my app with android, and showing them on a ImageView of my layout, and sometimes i got an exception java.lang.OutOfMemoryError: bitmap size exceeds VM budget. This happens when the photos are higher than…
NullPointerException
  • 36,107
  • 79
  • 222
  • 382
2
votes
1 answer

How to give the user the possibility to select a photo from the phone and show the image reduced to 100x100 pixels?

I' m starting on android, i want to learn to do this: To give the user the possibility to press a button and select a photo from the phone and show the image reduced to 100x100 pixels on a ImageView from my layout. If it is possible, the image haves…
NullPointerException
  • 36,107
  • 79
  • 222
  • 382
2
votes
2 answers

ImageView fit width crop bottom

I want to scale image to fit screen width and keep aspect ratio if image height is smaller than screen height. I want to strength it. if image height is larger than screen height. I want to crop it. I google for it but set scaleType to FitXY &…
JackWu
  • 1,036
  • 1
  • 12
  • 22
2
votes
1 answer

Sprite Image Animation

I was trying to find easy way to animate sprite image on my android project. Found some complicated solutions and usage of them was not so easy on RecyclerViewAdapter. Why it can not be doing easy and with custom view. Here is an example sprite…
2
votes
1 answer

How to pause and resume an animation?

I have a circular Imageview that I can start rotating it by clicking the button but I want to press the button again when it stops in that position. How can I do this? this is Animation
Binh Cao
  • 47
  • 1
  • 8
2
votes
1 answer

Android ImageView with setAdjustViewBounds inside ConstraintLayout with inexplicable behavior

I have a Android ConstraintLayout inside a ScrollView. I add a few buttons and an ImageView to the Layout. One of the buttons should constrain to the bottom of the ImageView. Here arises the problem: As soon as I set the image to resize to the…
B. P.
  • 31
  • 3
2
votes
1 answer

Make ImageView visible for set amount of time

I have an onClick method set in the xml layout file that triggers the vibration of the phone for 100ms at this point I have the ImageView Visibility set to visible so it can be seen. I want the ImageView to be set back to gone again when the…
SamRowley
  • 3,435
  • 7
  • 48
  • 77