You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I add Image(s) to any Layout (tested on Stack and Grid), the images is added with margins on the left and right side (around 5 px on each side). Isn't it supposed to fill the width of the container and keep aspect? I tried also with stretch="AspectFill" same result.
But as soon as I set a specific height to the image, the margins are gone.
@manijak, is this on iOS, Android or both? Could you please elaborate a little bit more on how to reproduce this and also make sure there is no unexpected css applied?
It's true, it does not happen everywhere. I tried adding some other images to the same view & container, and they fit as they should. I think it's a resize/aspect issue with some images.
The difference between images were the sizes. The images I have problems with are "banners" with a specific size of around: 994x172.
So there are no margins to be accurate, but there is some space on the left & right, so that the image does not fill the width.
@manijak, I tried the following specific image sizes: 1000x200, 998x199. 996x198, 994x197, 992x196 and with some of them I reproduced the issue. It is both on Android and iOS.
Activity
vchimev commentedon Feb 1, 2016
@manijak, is this on iOS, Android or both? Could you please elaborate a little bit more on how to reproduce this and also make sure there is no unexpected css applied?
Here is my page:
manijak commentedon Feb 1, 2016
It's true, it does not happen everywhere. I tried adding some other images to the same view & container, and they fit as they should. I think it's a resize/aspect issue with some images.
The difference between images were the sizes. The images I have problems with are "banners" with a specific size of around: 994x172.
So there are no margins to be accurate, but there is some space on the left & right, so that the image does not fill the width.
vchimev commentedon Feb 2, 2016
@manijak, I tried the following specific image sizes: 1000x200, 998x199. 996x198, 994x197, 992x196 and with some of them I reproduced the issue. It is both on Android and iOS.
hamorphis commentedon Jun 13, 2016
Sample app: https://github.com/hamorphis/issue-1425
hamorphis commentedon Jun 13, 2016
Android screenshot:

Fix: Images have margin when added to Layout
Fix: Images have margin when added to Layout
lock commentedon Aug 29, 2019
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.