我有一个微调器,当单击按钮时它会下降。但是当我试图设置 onItemSelectedListener 时,它并没有接受点击事件。
spnrLocation.setOnItemSelectedListener(new OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View arg1,
int arg2, long arg3) {
System.out.println("location clicked" + arg2);
edtLocation.setText(parent.getItemAtPosition(arg2).toString());
System.out.println("wfefe"
+ parent.getItemAtPosition(arg2).toString());
}
@Override
public void onNothingSelected(AdapterView<?> arg0) {
}
});