Updated some more transition animations

pull/14/head
Sam Bosley 13 years ago
parent e943d0ac67
commit 0de393e4c3

@ -193,8 +193,11 @@ public class TagSettingsActivity extends Activity {
Intent intent = new Intent(this, TagViewActivity.class);
intent.putExtra(TagViewActivity.EXTRA_TAG_NAME, newName);
intent.putExtra(TagViewActivity.TOKEN_FILTER, TagFilterExposer.filterFromTagData(this, tagData));
finish();
super.finish();
startActivity(intent);
AndroidUtilities.callApiMethod(5, this, "overridePendingTransition", //$NON-NLS-1$
new Class<?>[] { Integer.TYPE, Integer.TYPE },
R.anim.slide_left_in, R.anim.slide_left_out);
return;
}
@ -202,6 +205,24 @@ public class TagSettingsActivity extends Activity {
finish();
}
@Override
public void finish() {
finishWithAnimation(true);
}
private void finishWithAnimation(boolean backAnimation) {
super.finish();
if (backAnimation) {
AndroidUtilities.callApiMethod(5, this, "overridePendingTransition", //$NON-NLS-1$
new Class<?>[] { Integer.TYPE, Integer.TYPE },
R.anim.slide_right_in, R.anim.slide_right_out);
} else {
AndroidUtilities.callApiMethod(5, this, "overridePendingTransition", //$NON-NLS-1$
new Class<?>[] { Integer.TYPE, Integer.TYPE },
R.anim.slide_left_in, R.anim.slide_left_out);
}
}
@SuppressWarnings("nls")
private void refreshSettingsPage() {
tagName.setText(tagData.getValue(TagData.NAME));

@ -26,6 +26,7 @@ import com.timsu.astrid.R;
import com.todoroo.andlib.data.TodorooCursor;
import com.todoroo.andlib.service.Autowired;
import com.todoroo.andlib.service.DependencyInjectionService;
import com.todoroo.andlib.utility.AndroidUtilities;
import com.todoroo.andlib.utility.DateUtilities;
import com.todoroo.andlib.utility.DialogUtilities;
import com.todoroo.astrid.actfm.ActFmCameraModule.CameraResultCallback;
@ -176,6 +177,14 @@ public class TagUpdatesActivity extends ListActivity {
return true;
}
@Override
public void finish() {
super.finish();
AndroidUtilities.callApiMethod(5, this, "overridePendingTransition", //$NON-NLS-1$
new Class<?>[] { Integer.TYPE, Integer.TYPE },
R.anim.slide_right_in, R.anim.slide_right_out);
}
@Override
public boolean onMenuItemSelected(int featureId, MenuItem item) {
// handle my own menus

@ -37,6 +37,7 @@ import com.todoroo.andlib.service.NotificationManager;
import com.todoroo.andlib.service.NotificationManager.AndroidNotificationManager;
import com.todoroo.andlib.sql.Criterion;
import com.todoroo.andlib.sql.Query;
import com.todoroo.andlib.utility.AndroidUtilities;
import com.todoroo.andlib.utility.DateUtilities;
import com.todoroo.andlib.utility.DialogUtilities;
import com.todoroo.andlib.utility.Preferences;
@ -128,6 +129,9 @@ public class TagViewActivity extends TaskListActivity {
Intent intent = new Intent(TagViewActivity.this, TagUpdatesActivity.class);
intent.putExtra(EXTRA_TAG_DATA, tagData);
startActivity(intent);
AndroidUtilities.callApiMethod(5, TagViewActivity.this, "overridePendingTransition", //$NON-NLS-1$
new Class<?>[] { Integer.TYPE, Integer.TYPE },
R.anim.slide_left_in, R.anim.slide_left_out);
}
});
}
@ -142,6 +146,9 @@ public class TagViewActivity extends TaskListActivity {
Intent intent = new Intent(TagViewActivity.this, TagSettingsActivity.class);
intent.putExtra(EXTRA_TAG_DATA, tagData);
startActivityForResult(intent, REQUEST_CODE_SETTINGS);
AndroidUtilities.callApiMethod(5, TagViewActivity.this, "overridePendingTransition", //$NON-NLS-1$
new Class<?>[] { Integer.TYPE, Integer.TYPE },
R.anim.slide_left_in, R.anim.slide_left_out);
}
};

Loading…
Cancel
Save