SimpleCursorAdapter - change the way of binding cursor to view

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

Sponsored Links

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:
String[] from = new String[]{"title"};
int[] to = new int[]{};
SimpleCursorAdapter pins = new SimpleCursorAdapter(this, R.layout.row,
c, from, to);
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,


Other Threads

1. 404 on maps key signup on a site, and the other doesn't work


I have the following 404 error when I try to signup with my

I have verified: the page signup doesn't exist really, this is
problematic for me to generate my key, I'm developing an app for the

After a search on the net I found this other adress:

This time a key is generated for my debug keystore but the map stil
won't show.

In my code I use the keymap
                mapView = new MapView(this,
But in my LogCat (under eclipse) I still have the following log
06-24 09:39:48.970: ERROR/ActivityThread(710): Failed to find provider
info for
06-24 09:39:50.042: INFO/MapActivity(710): Handling network change
06-24 09:39:50.042: ERROR/MapActivity(710): Couldn't get connection
factory client

Please any help will be very appreciated.



2. How to make a custom View having it's height = width ?

Hi guy,

I'm trying to make my custom view looks like a square...
I'm putting my view in a linear layout like this :

- Header view
- square view (my custom view)
- footer view

With the screen orientation set to "Portrait" *I would like my square
view to have height the same as it's width.
My custom view extends View class and override the onDraw method...

I can't figure out how to tell my view to take height=width within the
linear layout.
Is it possible using onLayout, onsizeChanged, onMeasure
And what should i do with this method

In onMeasure I guess I should tell that measuredHeight should be the
same as measureWidth wich should be equals to the linearLayout
width... but How can I be aware at this time (onMeasure) of the width
of my contentLayout (linearLayout) ?



3. Android tab not appearing in Eclipse

4. Using Picture recording creates bad memory allocation

5. Inserting Data into a Cursor?

6. Mouse Events in Browser

7. browser plugin development?