diff options
| author | Android (Google) Code Review <android-gerrit@google.com> | 2009-12-16 11:29:36 -0800 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-12-16 11:29:36 -0800 |
| commit | 068f3dd6a112fe3311ace2fe98458a0176bed562 (patch) | |
| tree | 67b112b04f45c76345dc9101277c87e74358ad18 /tutorials/NotepadCodeLab/Notepadv2Solution/src/com/android/demo/notepad2/NoteEdit.java | |
| parent | 91f556a237e865cfe0daa2b467170c58278e4bea (diff) | |
| parent | 77560fc704f2933e0df8a4be0768b2439a0bab2a (diff) | |
Merge change Ie8b10efd
* changes:
Finish adding Makefiles for the Notepad tutorial.
Diffstat (limited to 'tutorials/NotepadCodeLab/Notepadv2Solution/src/com/android/demo/notepad2/NoteEdit.java')
| -rwxr-xr-x | tutorials/NotepadCodeLab/Notepadv2Solution/src/com/android/demo/notepad2/NoteEdit.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tutorials/NotepadCodeLab/Notepadv2Solution/src/com/android/demo/notepad2/NoteEdit.java b/tutorials/NotepadCodeLab/Notepadv2Solution/src/com/android/demo/notepad2/NoteEdit.java index 6c5e664b5..8c9dccc6b 100755 --- a/tutorials/NotepadCodeLab/Notepadv2Solution/src/com/android/demo/notepad2/NoteEdit.java +++ b/tutorials/NotepadCodeLab/Notepadv2Solution/src/com/android/demo/notepad2/NoteEdit.java @@ -9,7 +9,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.savedInstanceState + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ @@ -25,7 +25,7 @@ import android.widget.EditText; public class NoteEdit extends Activity { - private EditText mTitleText; + private EditText mTitleText; private EditText mBodyText; private Long mRowId; @@ -33,19 +33,19 @@ public class NoteEdit extends Activity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.note_edit); - + mTitleText = (EditText) findViewById(R.id.title); mBodyText = (EditText) findViewById(R.id.body); - + Button confirmButton = (Button) findViewById(R.id.confirm); - + mRowId = null; Bundle extras = getIntent().getExtras(); if (extras != null) { String title = extras.getString(NotesDbAdapter.KEY_TITLE); String body = extras.getString(NotesDbAdapter.KEY_BODY); mRowId = extras.getLong(NotesDbAdapter.KEY_ROWID); - + if (title != null) { mTitleText.setText(title); } @@ -53,24 +53,24 @@ public class NoteEdit extends Activity { mBodyText.setText(body); } } - + confirmButton.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { Bundle bundle = new Bundle(); - + bundle.putString(NotesDbAdapter.KEY_TITLE, mTitleText.getText().toString()); bundle.putString(NotesDbAdapter.KEY_BODY, mBodyText.getText().toString()); if (mRowId != null) { bundle.putLong(NotesDbAdapter.KEY_ROWID, mRowId); } - + Intent mIntent = new Intent(); mIntent.putExtras(bundle); setResult(RESULT_OK, mIntent); finish(); } - + }); } } |
