title: Android: How to switch between Activities like switching desktops in Home app?
body: <p>I'm developing an Android Application that has three very similar Activities. I would like the user to be able to switch between them by swiping left and right on the screen. 
  This is how I managed that up to now:</p>
  
  <p>I followed this <a href="http://android-journey.blogspot.com/2010/01/android-gestures.html" rel="noreferrer">post</a></p>
  
  <p>Then I changed the method onSwipe() in this way:</p>
  
  <pre><code>@Override
   public void onSwipe(int direction) {
    Intent intent = new Intent();
  
    switch (direction) {
  
    case SimpleGestureFilter.SWIPE_RIGHT:
     intent.setClass(this, TodoTodaySheet.class);
     break;
    case SimpleGestureFilter.SWIPE_LEFT:
     intent.setClass(this, TrashSheet.class);
     break;
  
    }
    startActivity(intent);
   }
  </code></pre>
  
  <p>It works but I'm not completely satisfied with this. Moreover, I don't know if this is the correct approach.</p>
  
  <p>I would like to have a behavior like the one on Home apps, when switching desktop. Therefore I would like a smoother animation and the appearance of the called activity from the right direction, eg. from the left side of the screen when swiping on the right.</p>
  
  <p>Any hints? Thank you very much.</p>