My app displays 2 buttons on the top and a car picture (1 of 4 possible) at the bottom:
Each image file has huge dimensions of 5616 x 3744 pixels and the app lags noticeably and also sometimes crashes (here fullscreen , Aspect Fill mode is used):
So I would like to scale down the image assets and include these files (for each of the 4 car pictures) in my app:
After searching around and I think I have to target the Rendered Pixels sizes, that is:
However my image view has 20 pixels insets (here fullscreen ):
So I am not sure, which value to subtract from the widths of car.jpg, car@2x.jpg and car@3x.jpg.
Should I subtract 40 pixels from each file (that is 20 on the left and 20 on the right)?
只需将图像调整为最大尺寸(@ 3x)-它会比现在小得多, aspect fill
将处理其余部分
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.