title: How to programatically set the width of an Android EditText view in DPs (not pixels)
body: <p>I'm dynamically generating a grid of EditText views in code based on a specified number of rows and columns.  I want each of the EditText views to be the same width (e.g., 100dp).</p>
  
  <p>Although I can set the size of the views with either setWidth or by creating a LayoutParam object, I only seem able to specify the value in pixels.  I instead want to use the DP (density independent) units, similar to what I've done using an XML layout.</p>
  
  <p>How can this be done in code?   </p>