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);
				myEditText.setText(sc.getString(1));
			} 
 
			public void onNothingSelected(AdapterView<?> arg0) {
				// TODO Auto-generated method stub 
			} 
		}); 
	} 
 
	@SuppressWarnings("deprecation") 
	private void operation(String cmd) {
		if (myEditText.getText().toString().equals(""))
			return; 
		if (cmd == "add") {
			TimePicker addTimePicker = (TimePicker) findViewById(R.id.timePicker1);