diff options
| author | Android (Google) Code Review <android-gerrit@google.com> | 2009-12-14 11:50:14 -0800 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-12-14 11:50:14 -0800 |
| commit | 5595acbed8ca1778a61881a00d7baaffecb2a64c (patch) | |
| tree | 477c4322db56a561e929f49e864d104261b4d014 /tutorials/NotepadCodeLab/Notepadv3Solution/src/com/android/demo | |
| parent | ec30731d8f415a427f15280bdc14ea6c54f5904d (diff) | |
| parent | 7c21d1cd4051a7aaab5c15d63649315708c6aaa4 (diff) | |
Merge change Ice325f3b into eclair-mr2
* changes:
Fix Notepadv3Solution orientation changes during NoteEdit
Diffstat (limited to 'tutorials/NotepadCodeLab/Notepadv3Solution/src/com/android/demo')
| -rwxr-xr-x | tutorials/NotepadCodeLab/Notepadv3Solution/src/com/android/demo/notepad3/NoteEdit.java | 7 |
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 |
