title: How to set FrameLayout height to match one of the child component
body: <p>I have the following framelayout containing a <code>TextView</code> and <code>ProgressBar</code>. At one given time, only one of them is shown. The <code>hideText</code> flag is initially set to false.</p>
  <pre><code>   &lt;FrameLayout
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;wrap_content&quot;&gt;
          &lt;TextView
              android:id=&quot;@+id/textview_detail_title&quot;
              android:layout_width=&quot;match_parent&quot;
              android:layout_height=&quot;wrap_content&quot;
              android:text=&quot;@{model.text}&quot;
              android:visibility=&quot;@{model.hideText}&quot; /&gt;
  
          &lt;ProgressBar
              android:id=&quot;@+id/progress_loader&quot;
              android:layout_width=&quot;match_parent&quot;
              android:layout_height=&quot;wrap_content&quot;
              android:visibility=&quot;@{!model.hideText}&quot; /&gt;
      &lt;/FrameLayout&gt;
  </code></pre>
  <p>The text in the <code>TextView</code> is fetched dynamically so the height of this component is unknown before runtime. When I set the <code>hideText</code> flag to <code>true</code>, The height of the frame layout shrinks to match the progress bar. However, I would like the frame layout to maintain it's initial height (ie that of the <code>TextView</code> and display the progress bar in the middle.</p>
  <p>Is there any way to specify the <code>ProgressBar</code>'s <code>android:layout_height</code> property to match the TextView height?</p>