SimpleCursorAdapter - change the way of binding cursor to view

by szulcu » Mon, 03 Nov 2008 15:34:00 GMT


Sponsored Links
 Hi,

I've got the following problem. I've got an sql table with the BLOB
field "title", a listview lv and cursor c.

If I use:
///////////////////////
startManagingCursor(c);
String[] from = new String[]{"title"};
int[] to = new int[]{R.id.rowtitle};
SimpleCursorAdapter pins = new SimpleCursorAdapter(this, R.layout.row,
c, from, to);
lv.setAdapter(pins);
///////////////////////
the application will crash. I suppose that I need to convert the value
from "title"'s byte[] to String, but don't know how to do it.

Please help,
martin

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. NoClassDefFoundError for gdata CalendarService class

I'm writing an android 2.1 application that writes an entry to my
Google calendar. The relevant part of my application code looks like
this:

        void addCalendarEntry(String googleUser, String password)
        throws Exception {

                URL postURL =
                    new URL("http://www.google.com/calendar/feeds/" +
googleUser +
                             "/private/full");

                CalendarService myService =
                    new CalendarService("myCompany-exampleApp-1.0");


This code compiles with no errors, using Eclipse on MacOS, using
external jar files from the Google gdata project:
gdata/java/lib/gdata-calendar-2.0.jar
gdata/java/lib/gdata-calendar-meta-2.0.jar

I export the application through Eclipse to generate the .apk file
which I install on my N-1 phone. However the application cannot find
the CalendarService class, giving me the following runtime error:

W/dalvikvm(11552): threadid=3: thread exiting with uncaught exception
(group=0x4001b180)
E/AndroidRuntime(11552): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime(11552): java.lang.NoClassDefFoundError:
com.google.gdata.client.calendar.CalendarService
E/AndroidRuntime(11552):        at
org.mbari.satellite.PassSummaryActivity.addCalendarEntry(PassSummaryActivity.java:
206)

When developing other android applications the "external jar files"
always seem to be cross-compiled and packed into the apk file - so I
do not understand why the app cannot find the CalendarService class.
Anyone have any ideas?

Thanks,
Tom

-- 

2. Ask s/w backup app

Guys
Kalo ada yg punya japri :)

| Rgds,
Jus |
~  send using dream eclair  ~

-- 
"Indonesian Android Community [id-android]" 

3. AppWidgetProvider and setTypeface

4. Application losing SharedPreferences and Sqlite database on Droid

5. Issues with Listener, "back" button, and onDestroy().

6. need help handset ke lock

7. Issues with Listener, "back" button, and onDestroy().