Questions tagged [adjustviewbounds]
11 questions
6
votes
0 answers
minWidth and minHeight has no effect on ImageView (Android)
For whatever reason, setting the minHeight and maxHeight has no effect on the image dimension inside an ImageView component. In some cases, I end up with a VERY SMALL image. I presume this is due to the fact that I have the width and height set to…

Darsen Lu
- 623
- 7
- 10
4
votes
1 answer
ImageView adjustViewBounds not working with fitXY
I use the following code to show my button
(Because I need to add the text on the button, so I will not use the ImageButton)

陳家錡
- 99
- 1
- 11
1
vote
1 answer
Android measuring an imageview
I need to measure the width of an ImageView, but when i measure it after setting
android:adjustViewBounds on the ImageView the measuredWidth is incorrect...
What am i doing wrong and how should i fix this?
My layout:

Joske369
- 505
- 1
- 6
- 18
1
vote
5 answers
Remove padding created from ImageView after scaling down LayoutParams
In my relative layout, I want two images to display on extreme right bottom and left bottom of the screen. I can see padding on the edges of the screen after scaling the width and height of the imageview to one third. I want padding to be removed…

Pradeep K M
- 1,461
- 2
- 10
- 17
1
vote
0 answers
Android-linear layout arrangement varies in emulator and device
I am developing project with 26 cards design alphabets in linear layout fashion in android. I had included android:adjustViewBounds="true" and android:scaleType="centercrop".
Forunately it works well in emulator and does not show up in the real…

user3327877
- 11
- 2
1
vote
2 answers
align view to a scaled ImageView
i have this problem frequently, and I refuse to believe that it can't be solved without creating a custom layout:
How do you align a view with an ImageView that get scaled to match it's parent bounds but keeps the aspect ratio ( scale type is…

P.Melch
- 8,066
- 43
- 40
0
votes
3 answers
How to fit image into the imageview perfectly without losing image quality android
Im trying to fit images perfectly in the imageView but the image dosent fit properly when i use centerCrop with adjustViewBounds but when i use fitXY with adjustViewBounds the image fits perfectly to the imageView but now the image quality gets…

Vasant Raval
- 257
- 1
- 12
- 31
0
votes
3 answers
Adjust ViewBounds of ImageView when parent layout contents overflow
I've a vertical LinearLayout containing following widgets displayed in center with LinearLayout's gravity set to "center":
ImageView
TextInputLayout
TextInputLayout
Button
This looks fine normally when when on smaller screen devices, the button in…

Umair
- 668
- 1
- 9
- 20
0
votes
4 answers
android ImageView adjustViewBounds not working. Whitespace
I have this problem that when I run application I get undesired white space on top of and below my image views.
I have tried to use adjustViewBounds and different scale types, the thing is I want to keep my pictures, exactly as they are, but just…

fluffow
- 35
- 1
- 10
0
votes
2 answers
How to maintain the aspect ratio of the image and fill the screen width?
I am trying to resize an image by keeping the aspect ratio. It should be just large enough to fill the screen width and if necessary some of the image should be off-screen.
here is a picture of what I want
I tried
android:adjustViewBounds
but…

Morteza Rastgoo
- 6,772
- 7
- 40
- 61
-1
votes
2 answers
Layout adjustViewBounds is not wokring
I want the ImageView keep its aspect ratio with layout_height=match_parent
but I don't know why this happen ?

user4254398
- 373
- 3
- 12