Would something like this work?

@Override
public void bindView(View view, Context context, Cursor cursor) {
    TextView daysUntil = (TextView) view.findViewById(R.id.daysuntil);

    String days = /* Calculations Here */

    daysUntil.setText(days);


    super.bindView(view, context, cursor);
}

On Jun 24, 10:13 am, nbadal <ladabk...@gmail.com> wrote:
> So if I wanted to intercept the date data from the database, then do
> my calculations, then send that number back out to a textview in the
> list item, what would I need to do?
>
> On Jun 24, 10:07 am, Marco Nelissen <marc...@android.com> wrote:
>
>
>
> > You can have your own CursorAdapter, and in its bindView do whatever
> > calculations and data mapping you need.
>
> > On Tue, Jun 23, 2009 at 7:19 PM, nbadal <ladabk...@gmail.com> wrote:
>
> > > Hello, I'm looking for a way to insert data into a cursor that is
> > > separate from the SQL database it retrieves the rest of the
> > > information from.
> > > Is there any way to to this, or is there a different way to add more
> > > information to a list view item?
>
> > > What I'm trying to do is to use a date column for each entry in the
> > > list to calculate the number of days until that date (and then put
> > > that number in the list item).
> > > I know how to get the value, but I just cant find a way to put it into
> > > the list without it being in the cursor.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to