Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save udacityandroid/d621c1a5ba77b31129b3ef2d954912d9 to your computer and use it in GitHub Desktop.
Save udacityandroid/d621c1a5ba77b31129b3ef2d954912d9 to your computer and use it in GitHub Desktop.
/** For this example, assume that
* public static final int GENDER_MALE = 1;
* public static final int GENDER_FEMALE = 2;
**/
String[] projection = { PetEntry.COLUMN_PET_BREED,
PetEntry.COLUMN_PET_WEIGHT };
String selection = PetEntry.COLUMN_PET_GENDER + “=?”;
String[] selectionArgs = new String[] { String.valueOf(PetEntry.GENDERFEMALE) };
Cursor c = db.query(PetEntry.TABLE_NAME, projection,
selection, selectionArgs,
null, null, null);
@burobot2016
Copy link

i will try it

@burobot2016
Copy link

its easy to write it and display that result
but

@Hammad003
Copy link

Screenshot (17)

Hello Ma'am: I am from India and I start Web Dev course on Udacity and i am practicing since 1 week,
as I send Screenshot I stucked there I am continuously trying to figure out but i cudn't , so plz tell me should I continue or not?

@Zaineb1
Copy link

Zaineb1 commented May 6, 2021

Hi!, you forget ';' in last ligne after 'quantyTextView.setText(""+number)};'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment