NotesDbAdapter actually doesn't need Activity, it needs a Context (which
is a superclass of Activity). It's then passed into SQLiteOpenHelper
subclass, to get application-specific database file location.
I'm not entirely clear on what Row class is supposed to be. Can you pass
an Activity or Context reference through class/methods parameters, all
the way to where you need it?
-- Kostya
14.12.2010 21:54, Tobiah пишет:
I'm making a database wrapper from the Notepad example to fit my own
database.
I decided that I'd have a generic 'Row' class that I'd subclass for each
table in the database. It would be responsible for setting and getting
and syncing data between the app and the database.
So, in the Notepad example, the NoteEdit class does this:
mDbHelper = new NotesDbAdapter(this);
mDbHelper.open();
But the NoteEdit class extends Activity. I don't see that
my Row class should extend Activity. Would it matter? If it
does, can I just extend Activity even though the Row class
will never be called as one?
Thanks,
Toby
--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en