After adding a UIImageView to Interface Builder and assigning a png filename to it, is there a shortcut key to use the PNG's dimension (width and height) as the UIImageView's dimension?
Thanks!
Use a android:scaleType="fitCenter" to have Android scale the images, and android:adjustViewBounds="true" to have them adjust their bounds due to scaling. All of these attributes can be set in code on each ImageButton at runtime. However, it is much easier to set and preview in xml in my opinion.
android:adjustViewBounds—If set to true, the attribute adjusts the bounds of the ImageView control to maintain the aspect ratio of the image displayed through it. android:resizeMode—The resizeMode attribute is used to make a control resizable so we can resize it horizontally, vertically, or around both axes.19-Dec-2012.
Size to Fit command, shortcut is Command + '='
Similar to this question: Pictures are very small when added to UIimageview in Interface Builder
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With