title: How to resize TextView using MotionLayout
body: <p>I'm trying to create a <code>CollapsingToolbar</code> animation using <code>MotionLayout</code>. </p>
  
  <p>I've successfully animated everything to behave just like a <code>CollapsingToolbar</code> with a high level of flexibility, which means I can easily create awesome animations without writing a large amount of code.</p>
  
  <p>My problem is no matter what I tried; I can't resize the title's <code>TextView</code> in a natural way.</p>
  
  <p>I'm currently using <code>ConstraintLayout</code> version <code>2.0.0-beta3</code></p>
  
  <p><strong>Trial #1</strong> </p>
  
  <p><code>CustomAttribute</code> of <code>textSize</code></p>
  
  <pre><code>&lt;ConstraintSet android:id="@+id/dish_fragment_expanded_set"&gt;
  
      ...
  
      &lt;Constraint
          android:id="@+id/dish_fragment_title_text"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginStart="16dp"
          android:layout_marginLeft="16dp"
          android:layout_marginTop="20dp"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toBottomOf="@id/dish_fragment_cover_image"&gt;
  
          &lt;CustomAttribute
              app:attributeName="textSize"
              app:customFloatValue="24" /&gt;
  
      &lt;/Constraint&gt;
  
      ...
  
  &lt;/ConstraintSet&gt;
  </code></pre>
  
  <pre><code>&lt;ConstraintSet android:id="@+id/dish_fragment_collapsed_set"&gt;
  
      ...
  
      &lt;Constraint
          android:id="@id/dish_fragment_title_text"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginStart="12dp"
          app:layout_constraintBottom_toBottomOf="@+id/dish_fragment_navigation_icon"
          app:layout_constraintStart_toEndOf="@+id/dish_fragment_navigation_icon"
          app:layout_constraintTop_toTopOf="@id/dish_fragment_navigation_icon"&gt;
  
          &lt;CustomAttribute
              app:attributeName="textSize"
              app:customFloatValue="16" /&gt;
  
      &lt;/Constraint&gt;
  
      ...
  
  &lt;/ConstraintSet&gt;
  </code></pre>
  
  <p><strong><em>Result</em></strong></p>
  
  <p>The solution above works, but the text flickers on movement, which means the animation is not smooth. </p>
  
  <hr>
  
  <p><strong>Trial #2</strong> </p>
  
  <p><code>scaleX</code> &amp; <code>scaleY</code></p>
  
  <pre><code>&lt;ConstraintSet android:id="@+id/dish_fragment_expanded_set"&gt;
  
      ...
  
      &lt;Constraint
          android:id="@+id/dish_fragment_title_text"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginStart="16dp"
          android:layout_marginLeft="16dp"
          android:layout_marginTop="20dp"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toBottomOf="@id/dish_fragment_cover_image"
          android:scaleX="1"
          android:scaleY="1"/&gt;
  
      ...
  
  &lt;/ConstraintSet&gt;
  </code></pre>
  
  <pre><code>&lt;ConstraintSet android:id="@+id/dish_fragment_collapsed_set"&gt;
  
      ...
  
      &lt;Constraint
          android:id="@id/dish_fragment_title_text"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginStart="12dp"
          app:layout_constraintBottom_toBottomOf="@+id/dish_fragment_navigation_icon"
          app:layout_constraintStart_toEndOf="@+id/dish_fragment_navigation_icon"
          app:layout_constraintTop_toTopOf="@id/dish_fragment_navigation_icon"       
          android:scaleX="0.70"
          android:scaleY="0.70"/&gt;
  
      ...
  
  &lt;/ConstraintSet&gt;
  </code></pre>
  
  <p><strong><em>Result</em></strong></p>
  
  <p>The solution above changes the size but not the layout params, which means it breaks the constraints in a way that I can't align it correctly with the navigation icon.</p>
  
  <hr>
  
  <p>I prefer to keep using <code>MotionLayout</code> because creating a smooth and detailed animation using <code>CollapsingToolbar</code> is a nightmare.</p>