title: Android - TabActivity with Transition animation
body: <p>I'm trying to add an animation to my TabActivty. For example, when the user select the 2nd tab, I want the new activity comes from the right. When the user select the first tab, I want the activity comes from the left.</p>
  
  <p>I've found how to add one animation, but I want to add one again. Here is the code I'm using:</p>
  
  <pre><code>public Animation inFromRightAnimation()
  {
      Animation inFromRight = new TranslateAnimation(
              Animation.RELATIVE_TO_PARENT, +1.0f,
              Animation.RELATIVE_TO_PARENT, 0.0f,
              Animation.RELATIVE_TO_PARENT, 0.0f,
              Animation.RELATIVE_TO_PARENT, 0.0f);
      inFromRight.setDuration(240);
      inFromRight.setInterpolator(new AccelerateInterpolator());
      return inFromRight;
  }
  </code></pre>
  
  <p>And</p>
  
  <pre><code>getTabHost().setOnTabChangedListener(new OnTabChangeListener() {
         public void onTabChanged(String tabId)
         {
             View currentView = getTabHost().getCurrentView();
             currentView.setAnimation( inFromRightAnimation() );
         }
  });
  </code></pre>
  
  <p>How can I do that?</p>
  
  <p>Thanks.</p>
  
  <p>Regards.</p>
  
  <p>V.</p>