Reputation: 39698
I want to set the size of an ImageView manually. The ImageView has a function setMinimumHeight, as to all views. What units am I telling the ImageView to place it in?
Upvotes: 5
Views: 1424
Reputation: 17077
You're getting and setting the size in pixels. When the minWidth
attribute is inflated from XML it's translated into a pixel measurement from its dimension:
from View.java:
case R.styleable.View_minWidth:
mMinWidth = a.getDimensionPixelSize(attr, 0);
Upvotes: 3