Code example for SQLiteCursor

Methods: getInt, getString

0
 
			public void onItemSelected(AdapterView<?> arg0, View arg1,
					int arg2, long arg3) {
				// TODO Auto-generated method stub 
				SQLiteCursor sc = (SQLiteCursor) arg0.getSelectedItem();
				_id = sc.getInt(0);
				pastEditText.setText(sc.getString(1));
			} 
 
			public void onNothingSelected(AdapterView<?> arg0) {
				// TODO Auto-generated method stub 
			} 
		}); 
	} 
 
	@SuppressWarnings("deprecation") 
	private void operation(String cmd) {
		if (pastEditText.getText().toString().equals(""))
			return; 
		if (cmd == "add") {
			pastHour = pastTimePicker.getCurrentHour();