📜  android 中的 spinner 事件 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:37.259000             🧑  作者: Mango

代码示例1
spinner.setOnItemSelectedListener(new OnItemSelectedListener() {
    @Override
    public void onItemSelected(AdapterView parentView, View selectedItemView, int position, long id) {
        // your code here
    }

    @Override
    public void onNothingSelected(AdapterView parentView) {
        // your code here
    }

});