Revision: 10166
Author: rj...@google.com
Date: Mon May 9 10:10:43 2011
Log: Fix the transition direction between read and task views
http://code.google.com/p/google-web-toolkit/source/detail?r=10166
Modified:
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/ClientFactoryImpl.java
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/ClientFactoryImplMobile.java
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/desktop/MobileWebAppShellDesktop.java
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/mobile/MobileWebAppShellMobile.java
=======================================
---
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/ClientFactoryImpl.java
Mon May 9 09:40:33 2011
+++
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/ClientFactoryImpl.java
Mon May 9 10:10:43 2011
@@ -154,7 +154,7 @@
*/
protected MobileWebAppShell createShell() {
return new MobileWebAppShellDesktop(eventBus, placeController,
getTaskListView(),
- getTaskEditView());
+ getTaskEditView(), getTaskReadView());
}
/**
=======================================
---
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/ClientFactoryImplMobile.java
Mon May 9 08:12:52 2011
+++
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/ClientFactoryImplMobile.java
Mon May 9 10:10:43 2011
@@ -32,7 +32,7 @@
@Override
protected MobileWebAppShell createShell() {
return new MobileWebAppShellMobile(orientationHelper,
getTaskListView(),
- getTaskEditView());
+ getTaskEditView(), getTaskReadView());
}
@Override
=======================================
---
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/desktop/MobileWebAppShellDesktop.java
Mon May 9 08:12:52 2011
+++
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/desktop/MobileWebAppShellDesktop.java
Mon May 9 10:10:43 2011
@@ -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);
=======================================
---
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/mobile/MobileWebAppShellMobile.java
Mon May 9 08:12:52 2011
+++
/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/mobile/MobileWebAppShellMobile.java
Mon May 9 10:10:43 2011
@@ -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);
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors