title: Setting programmatically the pixel size of a remote ImageVIew?
body: <p>Let's say that I have a layout that contains</p>
  
  <pre><code>&lt;ImageView
          android:id="@+id/my_id"
          android:layout_width="123px"
          android:layout_height="345px"
          android:padding="0dip"
          android:scaleType="fitXY" /&gt;
  </code></pre>
  
  <p>which is used in an AppWidget and is set via a RemoteViews. How can I programmatically set the width and height in pixels (overriding the 123 and 345 in the above xml)?</p>
  
  <p>(motivation: this image view shows a dynamic png file that is set at runtime via a file URL. If the layout_width and layout_height above are set to wrap_content, the image is displayed scaled down the the device's density(). Setting the exact width and height in pixels solves the problem but the file size changes and I don't know how to set it programmatically).</p>