When I set MinimumHeight, which units do I use?

I want to set ImageView size manually. ImageView has a setMinimumHeight function, as with all views. What units do I say ImageView to place it?

+4
source share
1 answer

You get and set the size in pixels. When the minWidth attribute minWidth inflated from XML, it is converted to a pixel dimension from its size:

from View.java:

 case R.styleable.View_minWidth: mMinWidth = a.getDimensionPixelSize(attr, 0); 
+2
source

All Articles