/*
Matrix Cursor
*
i want to publish a ContentProvider there are two ways for it with a
database or you can use a matrix cursor.
i want to use a Matrix cursor what i have is the following code:
Model:*/
class sample {
public string ID;
public string Name;
public sample(string id, string name)
{
this.ID = id;
this.Name = name;
}
public string[] GetProjection()
{
return new String[] {ID, Name};
}
}
// sampleList<sample> = new List<sample>();
// i fill sampleList with 100 entrys ID = the count and Name = count + "
item"
// in the on Query in the provider:
public override ICursor Query(Android.Net.Uri uri, string[]
projection, string selection, string[] selectionArgs, string sortOrder)
{
int i = 0;
string[] ArtikelColumns = {"_id", "Name"};
MatrixCursor matrixCursor = new MatrixCursor(ArtikelColumns);
for (i = 0; i < sampleList.Count; i ++)
{
matrixCursor.AddRow( sampleList[i].GetProjection() );
}
return matrixCursor;
}
}
// this gives me Back an Error cannot Convert from Java.Lang.String to
'string'
// is there anoter posibility to use a contentProvider with a list or only
with a Database?
// i have also tried with an Java.Lang.Object[] and System.String and
System.Object but no Luck
//i am currently using Monodroid 4.0.0
Thanks Enrico
--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/Content-Provider-an-Matrix-Cursor-tp5095333p5095333.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid