Hi,
I'm currently developing a small application for Android using a
database.
I have a table with 3 fields : day, month, year.
When I retrieve them from the database, I use the following method :
public Cursor getAllItems(){
return db.query(this.tableName, new String[]{
(...)
"day",
"month",
"year"}, null, null, null, null, null);
}
And to populate a ListActivity, I use this method :
public void bindData(){
Cursor c = db.getAllItems();
startManagingCursor(c);
SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
R.layout.list_item,
c,
new String[]{ (...) "day", "month", "year"},
new int[]{ (...) , R.id.TextDay, R.id.TextMonth,
R.id.TextYear}
);
setListAdapter(adapter);
}
And it works.
Now, I would like to get those 3 fields and convert it into a specific
Object I have written (let's call it MyDate ^^)
How can I convert those 3 fields into one single string with my MyDate
object ? (using toString());
I don't know if I'm very clear... :s
Thanks for your help
--
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