title: Android view layout_width - how to change programmatically?
body: <p>This is my view, and I wish to change layout_width to "10dip". How do I do so programmatically?
  Note, this is not a LinearLayout, it's a View.</p>
  
  <pre><code>&lt;View 
      android:id="@+id/nutrition_bar_filled" 
      android:background="@drawable/green_rectangle" 
      android:layout_height="30dp"
      android:layout_width="50dp"/&gt;       
  </code></pre>
  
  <p>I know about LayoutParams. How do I use it to set the width to 10dip?       </p>