Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 91791 Details for
Bug 221723
Override method fails with and error saying "1" due to a java.lang.ArrayIndexOutOfBoundsException:
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
This is the source code file Im working on
Notepadv1.java (text/x-java), 2.50 KB, created by
Pablo Ilardi
on 2008-03-06 14:45:29 EST
(
hide
)
Description:
This is the source code file Im working on
Filename:
MIME Type:
Creator:
Pablo Ilardi
Created:
2008-03-06 14:45:29 EST
Size:
2.50 KB
patch
obsolete
>/* > * Copyright (C) 2008 Google Inc. > * > * Licensed under the Apache License, Version 2.0 (the "License"); > * you may not use this file except in compliance with the License. > * You may obtain a copy of the License at > * > * http://www.apache.org/licenses/LICENSE-2.0 > * > * 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. > * See the License for the specific language governing permissions and > * limitations under the License. > */ > >package com.google.android.demo.notepad1; > >import android.app.ListActivity; >import android.content.Intent; >import android.database.Cursor; >import android.os.Bundle; >import android.view.Menu; >import android.widget.SimpleCursorAdapter; > >public class Notepadv1 extends ListActivity { > > private NotesDbAdapter mDbHelper; > > @Override > public void onCreate(Bundle icicle) { > super.onCreate(icicle); > this.setContentView(R.layout.notepad_list); > this.mDbHelper = new NotesDbAdapter(this); > this.mDbHelper.open(); > this.fillData(); > } > > @Override > public boolean onCreateOptionsMenu(Menu menu) { > boolean result = super.onCreateOptionsMenu(menu); > menu.add(0, 0, R.string.menu_insert, new Runnable() { > @Override > public void run() { > Notepadv1.this.createNote(); > } > }); > > menu.add(0, 0, R.string.menu_delete, new Runnable() { > @Override > public void run() { > Notepadv1.this.deleteNote(); > } > }); > return result; > } > > @Override > protected void onActivityResult(int requestCode, int resultCode, String data, Bundle extras) { > super.onActivityResult(requestCode, resultCode, data, extras); > } > > // /////////////// Behaviour > > private void createNote() { > Intent intent = new Intent(this, NoteEdit.class); > this.startSubActivity(intent, NoteEdit.CREATE); > } > > private void deleteNote() { > long noteId = this.getListView().getSelectedItemId(); > if (!this.mDbHelper.deleteNote(noteId)) { > System.err.println("failed to delete note : "); > } > this.fillData(); > } > > private void fillData() { > // Get all of the notes from the database and create the item list > Cursor c = mDbHelper.fetchAllNotes(); > this.startManagingCursor(c); > > String[] from = new String[] { NotesDbAdapter.KEY_TITLE }; > int[] to = new int[] { R.id.text1 }; > > // Now create an array adapter and set it to display using our row > SimpleCursorAdapter notes = new SimpleCursorAdapter(this, > R.layout.notes_row, c, from, to); > this.setListAdapter(notes); > } > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 221723
: 91791 |
92443
|
92552