我已经为旋转器编写了一个setOnItemSelectedListener,以在旋转器项目更改时做出响应。我的要求是,当我再次单击当前选择的项目时,应显示一个祝酒词。如何获得此活动?再次单击当前选择的项目时,微调器没有响应。`
StorageSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener(){
@Override
public void onItemSelected(AdapterView adapter, View v, int i, long lng) {
Toast.makeText(getApplicationContext(), (CharSequence) StorageSpinner.getSelectedItem(), Toast.LENGTH_SHORT).show();
}
@Override
public void onNothingSelected(AdapterView arg0) {
Toast.makeText(getApplicationContext(), "Nothing selected", Toast.LENGTH_SHORT).show();
}
});
慕虎7371278
繁星淼淼
倚天杖
相关分类