title: How to wrap a layout to its views without exceeding a fixed size?
body: <p>I am using this layout in order to have three fixed views:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/linearLayout"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="horizontal" &gt;
  
      &lt;TextView
          android:id="@+id/title"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_weight="2"
          android:textColor="#372c24" 
          android:paddingLeft="10dp"/&gt;
  
      &lt;View
          android:id="@+id/space"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_weight="5"
          android:background="@android:color/transparent" /&gt;
  
      &lt;LinearLayout
          android:id="@+id/ratingLayout"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_weight="4"
          android:orientation="horizontal" 
          android:background="@drawable/shape_popup"&gt;
          &lt;TextView
              android:id="@+id/rateNumber"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_weight="2"
              android:gravity="center_horizontal"
              android:paddingTop="2dp" 
            /&gt;
          &lt;ImageView
              android:contentDescription="@string/app_name"
              android:id="@+id/rateStar"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_weight="2"
              android:layout_gravity="center_horizontal"
              android:src="@drawable/rate_star"/&gt;
      &lt;/LinearLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>I want my <code>ratingLayout</code> to wrap its content but not to exceed its fixed size. Is that possible?</p>