Re: [android-developers] ExpandableListViews, SimpleCursorTreeAdapters and my sanity

2011-02-14 Thread Richard Marsh
Hey Kostya Just a quick update to let you know that I figured it out with your help. You were right on the button with what to do. Played around getting it to work, but no I'm setting background colors, doing group header totals etc. Again, much thanks for the help! I'll post a tutorial either

[android-developers] ExpandableListViews, SimpleCursorTreeAdapters and my sanity

2011-02-11 Thread Richard Marsh
Hi everyone I've been stuck on this issue for a couple of days now and I think I'm close to murder, so any help would be greatly appreciated. First just a little context. I have a db with a Budget and Category tables. The fields are _id ,CategoryID, Item and Amount. The amount is stored as a

Re: [android-developers] ExpandableListViews, SimpleCursorTreeAdapters and my sanity

2011-02-11 Thread Kostya Vasilyev
Richard, Adapter view binders are only a convenience feature, and you can always skip to the real stuff. SimpleCursorTreeAdapter has this private method where mViewBinder is used: private void bindView(View view, Context context, Cursor cursor, int[] from, int[] to) { ViewBinder binder =

Re: [android-developers] ExpandableListViews, SimpleCursorTreeAdapters and my sanity

2011-02-11 Thread Richard Marsh
Kostya, Thank you SO much for taking the time to reply. I guess the next rookie question would be: Do I get the source code for the SimpleCursorTreeAdapter and modify it to build my own I was playing around with that idea and when I tried to overwrite the method below, my custom adapter didn't

Re: [android-developers] ExpandableListViews, SimpleCursorTreeAdapters and my sanity

2011-02-11 Thread Kostya Vasilyev
Richard, To keep it simple, I would recommend: 1. Override bindChildView and set your floating point value manually. You can get the value from the cursor, call findViewById() on the view that's passed it to get the TextView that should show the value, format the value as a string, and then

Re: [android-developers] ExpandableListViews, SimpleCursorTreeAdapters and my sanity

2011-02-11 Thread Richard Marsh
Kostya Brilliant! I'm going to get stuck in with this, this weekend and hopefully get it right. I did try something similar to what you mentioned, but I wasn't sure if i was on the right track and when it didn't work (most likely something I did wrong) moved on. I have a much better idea of what

Re: [android-developers] ExpandableListViews, SimpleCursorTreeAdapters and my sanity

2011-02-11 Thread Kostya Vasilyev
11.02.2011 16:28, Richard Marsh пишет: Kostya Brilliant! I'm going to get stuck in with this, this weekend and hopefully get it right. I did try something similar to what you mentioned, but I wasn't sure if i was on the right track and when it didn't work (most likely something I did wrong)