title: Scaling a view reduces the content size but increases blank margins
body: <p>I'm trying to scale a horizontal <code>LinearLayout</code> that contains <code>DatePicker</code> and <code>TimePicker</code> adding</p>
  
  <pre><code>android:scaleX="0.6"
  android:scaleY="0.6"
  </code></pre>
  
  <p>The problem is that this scales the content but increases the margin at the same time, so I cannot use the space properly. In the picture the marked white area is the space gained by scaling, but I cannot use this space (in fact, the clock on the right is cropped)</p>
  
  <p><img src="https://i.stack.imgur.com/FdAPN.png" alt="Screenshot"></p>
  
  <pre><code>&lt;LinearLayout
      android:orientation="horizontal"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_gravity="center_horizontal"
      android:scaleX="0.6"
      android:scaleY="0.6"&gt;
  
      &lt;DatePicker
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:id="@+id/datePicker"
          android:layout_gravity="center_horizontal"
          android:calendarViewShown="false"
          android:spinnersShown="false"
          android:layoutMode="opticalBounds"
          android:measureAllChildren="true" /&gt;
  
      &lt;TimePicker
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:id="@+id/timePicker"
          android:layout_gravity="center_horizontal"
          android:layout_marginBottom="5dp" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Any solution to scale the view without this blank space problem?</p>