title: Issue with ImageView refresh in relation to layout_height setting
body: <p>I just spent about 3 hours tracking down following issue:</p>
  
  <p>I have a ListView with userdefined items, which contain an image and a label. The images are loaded in a separate thread, and a notification is sent to the UI thread upon completion, so the ImageView can be updated.</p>
  
  <p>Here's the code snippets that I think are relevant:</p>
  
  <pre><code>    public final class IconListAdapter extends BaseAdapter
  {
      ...
  
      public static final class Item
      {
          final StandardIcon standardIcon;
          Bitmap albumIcon;
          final String label;
          ImageView albumIconObserver;
  
          ...
  
          public Item(final File iconFile)
          {
              if (iconFile != null)
              {
                  new Thread()
                  {
                      public void run()
                      {
                          synchronized (IconListAdapter.class)
                          {
                              albumIcon = BitmapFactory.decodeFile(iconFile.getPath());
  
                              if (handler != null &amp;&amp; albumIconObserver != null &amp;&amp; albumIcon != null)
                              {
                                  handler.sendMessage(new MessageData(Item.this, albumIconObserver));
                              }
                          }
                      }
                  }.start();
              }
              ...
          }
      }
  
      public IconListAdapter(Activity context, Vector&lt;Item&gt; itemList)
      {
          ...
  
          handler = new Handler()
          {
              public void handleMessage(Message message)
              {
                  MessageData messageData = (MessageData)message.obj;
                  messageData.imageView.setImageBitmap(messageData.item.albumIcon);
              }
          };
      }
  
      public View getView(int position, View convertView, ViewGroup parent)
      {
          ...
  
          synchronized (IconListAdapter.class)
          {
              if (item.albumIcon != null)
              {
                  icon.setImageBitmap(item.albumIcon);
              }
              else
              {
                  icon.setImageResource(item.standardIcon.resourceId);
                  item.setAlbumIconObserver(icon);
              }
          }
  
          ...
      }
  }
  </code></pre>
  
  <p>This code perfectly worked as long as I had following XML layout for the ListView:</p>
  
  <pre><code>&lt;ListView
      android:id="@+id/fileListView"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:layout_weight="100" /&gt;
  </code></pre>
  
  <p>At some point - I learned more about layout weight stuff and wanted to make it more robust - I changed it to this (which had absolutely no effect on the layout size that was assigned to the ListView, it still stretched from below the title label down to the bottom):</p>
  
  <pre><code>&lt;ListView
      android:id="@+id/fileListView"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:layout_weight="100" /&gt;
  </code></pre>
  
  <p>From then on it didn't work anymore. Only the first icon got loaded (sometimes even no icon at all), and they only updated when I scrolled through the list, so the getView() method on the items was invoked again, meanwhilst the image files were loaded.</p>
  
  <p>(Unfortunately I made so many other changes to the code before I noticed the new problem, that it took a lot of effort to track it down.)</p>
  
  <p>Now my question: Why the hell does this little change in the layout settings have such an unexpected and horrible side-effect? Is it a known bug, or is there something I don't yet understand?</p>
  
  <p><em>bumping head against wall repeatedly</em></p>
  
  <p>Info about my environment: Eclipse 3.7.1, Android API 7, Samsung Galaxy with firmware version 2.2</p>