vendredi 1 mai 2015

If statement with cursor?

So what I am trying to do is display some information from my sqlite database into a listview. I got the basics down for that but how I display the information needs to be conditional from what the cursor gets back. Currently my cursor comes back liek this.

{
id_number=1234
text=testing
type=1
datetime=null
}

What I need to do is get the type and display according. Example:

if (type == 1){ do code } else if (type == 2) { do a different code }

How exactly would I parse it to do this?

Aucun commentaire:

Enregistrer un commentaire