title: Best way to animate rectangle in Android
body: <p>I want to animate a rectangle filled with one opaque color. The attributes I will be animating is the translation, and the width of the active menu item.</p>
  
  <p>I know how to animate things, but in this case, I want it to do no layouts on the view, since my animation will occur inside a LinearLayout, and it will not exceed it's size.</p>
  
  <p>The Blue line on top of my layout is what I will be animating. It will go horizontally to the left and right, while changing it's width, so that it fits on the selected menu item.</p>
  
  <p><img src="https://i.stack.imgur.com/kFqBY.png" alt="enter image description here"></p>
  
  <p>I usually work with animations on the margin, but it consumes a lot of processing to re-calculate bounds on the layout process.</p>
  
  <p>Any suggestions on how to do that?</p>