title: How to animate a View's translation
body: <p>At the first click of a button, I want to slide a <code>View</code> along the x-axis (by 200 pixels to the right let's say). And on the second press of the button, I want to slide the <code>View</code> back along the x-axis to its original position.</p>
  
  <p>The <code>View.setTranslationX(float)</code> method <em>jumps</em> the View to the target horizontal locations with calls <code>myView.setTranslationX(200);</code> and <code>myView.setTranslationX(0);</code> respectively. Anyone know how I can <em>slide</em> the <code>View</code> to the target horizontal locations instead?</p>
  
  <blockquote>
    <p><strong>Note 1:</strong> A <code>TranslateAnimation</code> is no good since it doesn't actually move
    the <code>View</code> but only presents the illusion of it moving.</p>
    
    <p><strong>Note 2:</strong> I didn't realise at the time of posing the question that the <code>setTranslationX(float)</code> and <code>setTranslationY(float)</code> methods were introduced as of API Level 11. If you're targeting Honeycomb (API Level 11) upwards, then Gautam K's answer will suffice. Otherwise, see my answer for a suggested solution.</p>
  </blockquote>