*Your event handler doesn't run during initialization. It runs on the**
first layout*
New to android. Facing the same problem on spinner, but what do you mean by
first layout? Is there any relationship with XML layout or you mean the
first spinner.setOnItemSelectedListener(null)?
--
I have code like:
void init() {
spinner.setOnItemSelectedListener(null);
spinner.setAdapter(prioritiesAdapter);
spinner.setSelection(task.getPriority() - 1);
spinner.setOnItemSelectedListener(this);
}
@Override
public void onItemSelected(AdapterView? parent, View v, int
position, long
2 matches
Mail list logo