即使我还没有从微调器中选择,我在 EditText 中也获得了默认值。有人可以帮助我吗?
public void onItemSelected(AdapterView<?> parent, View v, int position,
long id) {
// TODO Auto-generated method stub
etCountry.setText("");
switch(parent.getId()){
case R.id.spcountry:
etCountry.setText(parent.getItemAtPosition(position).toString());
break;
}
}
public void onNothingSelected(AdapterView<?> arg0) {
// TODO Auto-generated method stub
etCountry.setText("");
}