PearsonArtPhoto
PearsonArtPhoto

Reputation: 39698

When I setMinimumHeight, what units am I using?

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

Answers (1)

Jens
Jens

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

Related Questions