Spinner delete items

后端 未结 4 1985
南笙
南笙 2021-01-18 10:29

I have developed an application in which i have one edit text value of edit text is entered in spinner on button clicked an the item i select to delete gets deleted but the

4条回答
  •  不知归路
    2021-01-18 11:08

    For me the accepted answer throwed an exception so what I did was this.

        ArrayAdapter adapter = new ArrayAdapter<>(getActivity(),
    android.R.layout.simple_spinner_item, Collections.emptyList());
    spinner.setAdapter(adapter);
    

提交回复
热议问题