Fix the transition direction between read and task views


git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@10166 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/ClientFactoryImpl.java b/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/ClientFactoryImpl.java
index 5809ccb..5ce3c5a 100644
--- a/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/ClientFactoryImpl.java
+++ b/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/ClientFactoryImpl.java
@@ -154,7 +154,7 @@
    */
   protected MobileWebAppShell createShell() {
     return new MobileWebAppShellDesktop(eventBus, placeController, getTaskListView(),
-        getTaskEditView());
+        getTaskEditView(), getTaskReadView());
   }
 
   /**
diff --git a/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/ClientFactoryImplMobile.java b/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/ClientFactoryImplMobile.java
index 2d43fe2..daa3887 100644
--- a/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/ClientFactoryImplMobile.java
+++ b/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/ClientFactoryImplMobile.java
@@ -32,7 +32,7 @@
   @Override
   protected MobileWebAppShell createShell() {
     return new MobileWebAppShellMobile(orientationHelper, getTaskListView(),
-        getTaskEditView());
+        getTaskEditView(), getTaskReadView());
   }
 
   @Override
diff --git a/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/desktop/MobileWebAppShellDesktop.java b/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/desktop/MobileWebAppShellDesktop.java
index 054ca2b..0d92b32 100644
--- a/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/desktop/MobileWebAppShellDesktop.java
+++ b/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/desktop/MobileWebAppShellDesktop.java
@@ -33,6 +33,7 @@
 import com.google.gwt.sample.mobilewebapp.client.activity.TaskListActivity;
 import com.google.gwt.sample.mobilewebapp.client.activity.TaskListActivity.TaskListUpdateEvent;
 import com.google.gwt.sample.mobilewebapp.client.activity.TaskListView;
+import com.google.gwt.sample.mobilewebapp.client.activity.TaskReadView;
 import com.google.gwt.sample.mobilewebapp.client.place.TaskEditPlace;
 import com.google.gwt.sample.mobilewebapp.client.place.TaskListPlace;
 import com.google.gwt.sample.mobilewebapp.shared.TaskProxy;
@@ -205,7 +206,7 @@
    * @param clientFactory the {@link ClientFactory} of shared resources
    */
   public MobileWebAppShellDesktop(EventBus bus, final PlaceController placeController,
-      TaskListView taskListView, TaskEditView taskEditView) {
+      TaskListView taskListView, TaskEditView taskEditView, TaskReadView taskReadView) {
 
     // Initialize the main menu.
     Resources resources = GWT.create(Resources.class);
@@ -283,13 +284,14 @@
     setAddButtonHandler(null);
 
     /*
-     * Add both views to the DeckLayoutPanel so we can animate between them.
-     * Using a DeckLayoutPanel here works because we only have two views, and we
-     * always know that the edit view should animate in from the right side of
+     * Add all views to the DeckLayoutPanel so we can animate between them.
+     * Using a DeckLayoutPanel here works because we only have a few views, and we
+     * always know that the task views should animate in from the right side of
      * the screen. A more complex app will require more complex logic to figure
      * out which direction to animate.
      */
     contentContainer.add(taskListView);
+    contentContainer.add(taskReadView);
     contentContainer.add(taskEditView);
     contentContainer.setAnimationDuration(800);
 
diff --git a/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/mobile/MobileWebAppShellMobile.java b/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/mobile/MobileWebAppShellMobile.java
index 95d8eee..281e2a6 100644
--- a/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/mobile/MobileWebAppShellMobile.java
+++ b/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/mobile/MobileWebAppShellMobile.java
@@ -25,6 +25,7 @@
 import com.google.gwt.sample.mobilewebapp.client.MobileWebAppShell;
 import com.google.gwt.sample.mobilewebapp.client.activity.TaskEditView;
 import com.google.gwt.sample.mobilewebapp.client.activity.TaskListView;
+import com.google.gwt.sample.mobilewebapp.client.activity.TaskReadView;
 import com.google.gwt.sample.mobilewebapp.client.ui.OrientationHelper;
 import com.google.gwt.uibinder.client.UiBinder;
 import com.google.gwt.uibinder.client.UiField;
@@ -109,7 +110,7 @@
    * @param clientFactory the {@link ClientFactory} of shared resources
    */
   public MobileWebAppShellMobile(OrientationHelper orientationHelper, TaskListView taskListView,
-      TaskEditView taskEditView) {
+      TaskEditView taskEditView, TaskReadView taskReadView) {
 
     initWidget(uiBinder.createAndBindUi(this));
 
@@ -117,13 +118,14 @@
     setAddButtonHandler(null);
 
     /*
-     * Add both views to the DeckLayoutPanel so we can animate between them.
-     * Using a DeckLayoutPanel here works because we only have two views, and we
-     * always know that the edit view should animate in from the right side of
+     * Add all views to the DeckLayoutPanel so we can animate between them.
+     * Using a DeckLayoutPanel here works because we only have a few views, and we
+     * always know that the task views should animate in from the right side of
      * the screen. A more complex app will require more complex logic to figure
      * out which direction to animate.
      */
     contentContainer.add(taskListView);
+    contentContainer.add(taskReadView);
     contentContainer.add(taskEditView);
     contentContainer.setAnimationDuration(500);