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. 404 on maps key signup on a site, and the other doesn't work

Hi,

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

http://code.google.com/intl/fr/android/add-ons/google-apis/signup.html?agreeTerms=1&fp=31%3AC9%3A5F%3A87%3AD9%3A9D%3A77%3A65%3A90%3A71%3AF6%3AD3%3AD9%3A4B%3A74%3A78

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
Android.

After a search on the net I found this other adress:
http://code.google.com/intl/fr/android/maps-api-signup.html

This time a key is generated for my debug keystore but the map stil
won't show.
http://www.google.com/glm/mmap/a/api?fp=31%3AC9%3A5F%3A87%3AD9%3A9D%3A77%3A65%3A90%3A71%3AF6%3AD3%3AD9%3A4B%3A74%3A78

In my code I use the keymap
                mapView = new MapView(this,
"0i_wgL9EbKDC7Ut39ZTFvfTEwbbGLOI30CtaI1w");
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 com.google.settings
06-24 09:39:50.042: INFO/MapActivity(710): Handling network change
notification:CONNECTED
06-24 09:39:50.042: ERROR/MapActivity(710): Couldn't get connection
factory client


Please any help will be very appreciated.

Regards,
Zied

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

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 :

LinearLayout
- 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) ?

Thx

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

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?