title: How can I resize a parent layout when its children scale?
body: <p>I have a HorizontalScrollView that contains a horizontal LinearLayout that contains a series of custom views (ToolbarButton):</p>
  
  <pre><code>&lt;HorizontalScrollView
      android:layout_width="match_parent"
      android:layout_height="wrap_content"&gt;
  
      &lt;LinearLayout
          android:orientation="horizontal"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"&gt;
  
          &lt;ToolbarButton/&gt;
          &lt;ToolbarButton/&gt;
          ...
  
      &lt;/LinearLayout&gt;
  
  &lt;/HorizontalScrollView&gt;
  </code></pre>
  
  <p>Now, at run time, I want to scale the ToolbarButtons to be smaller using setScaleX and setScaleY.  The scaling works, but the positions of the ToolbarButtons does not change, nor does the size of the LinearLayout.</p>
  
  <p>When I use scaleX and scaleY in the ToolbarButtons in xml (not runtime) I get the same result.</p>
  
  <p>My goal is to dynamically shrink the ToolbarButtons and have the space around them also shrink.  How do I do this?  Thank you.</p>