summaryrefslogtreecommitdiff
path: root/tutorials/NotepadCodeLab/Notepadv3Solution/src
diff options
context:
space:
mode:
authorTom O'Neill <tomo@google.com>2009-12-14 15:24:09 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2009-12-14 15:24:09 -0800
commitba192890472dbb92c01d596633571fe2f074d759 (patch)
tree49892487ca06bb879eb6662c261fb29fb99d7039 /tutorials/NotepadCodeLab/Notepadv3Solution/src
parent51afa32c69aca2206578f363af50753f59d19574 (diff)
parent5595acbed8ca1778a61881a00d7baaffecb2a64c (diff)
am 5595acbe: Merge change Ice325f3b into eclair-mr2
Merge commit '5595acbed8ca1778a61881a00d7baaffecb2a64c' into eclair-mr2-plus-aosp * commit '5595acbed8ca1778a61881a00d7baaffecb2a64c': Fix Notepadv3Solution orientation changes during NoteEdit
Diffstat (limited to 'tutorials/NotepadCodeLab/Notepadv3Solution/src')
-rwxr-xr-xtutorials/NotepadCodeLab/Notepadv3Solution/src/com/android/demo/notepad3/NoteEdit.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/tutorials/NotepadCodeLab/Notepadv3Solution/src/com/android/demo/notepad3/NoteEdit.java b/tutorials/NotepadCodeLab/Notepadv3Solution/src/com/android/demo/notepad3/NoteEdit.java
index 710ea339d..f5eb6c433 100755
--- a/tutorials/NotepadCodeLab/Notepadv3Solution/src/com/android/demo/notepad3/NoteEdit.java
+++ b/tutorials/NotepadCodeLab/Notepadv3Solution/src/com/android/demo/notepad3/NoteEdit.java
@@ -43,8 +43,8 @@ public class NoteEdit extends Activity {
Button confirmButton = (Button) findViewById(R.id.confirm);
- mRowId = savedInstanceState != null ? savedInstanceState.getLong(NotesDbAdapter.KEY_ROWID)
- : null;
+ mRowId = (savedInstanceState == null) ? null :
+ (Long) savedInstanceState.getSerializable(NotesDbAdapter.KEY_ROWID);
if (mRowId == null) {
Bundle extras = getIntent().getExtras();
mRowId = extras != null ? extras.getLong(NotesDbAdapter.KEY_ROWID)
@@ -77,7 +77,8 @@ public class NoteEdit extends Activity {
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
- outState.putLong(NotesDbAdapter.KEY_ROWID, mRowId);
+ saveState();
+ outState.putSerializable(NotesDbAdapter.KEY_ROWID, mRowId);
}
@Override