title: Programmatically set height on LayoutParams as density-independent pixels
body: <p>Is there any way to set the height/width of a <a href="http://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html" rel="noreferrer">LayoutParams</a> as density-independent pixels (dp)? It looks like the height/width, when set programmatically, are in pixels and not dp. </p>