Why can't one add/remove items from an ArrayAdapter?

前端 未结 7 1244
一整个雨季
一整个雨季 2020-11-29 07:26

I am using an ArrayAdapter to populate the items to list in a android.widget.Spinner. That works all fine.

But now I wa

7条回答
  •  借酒劲吻你
    2020-11-29 07:38

    You probably initialized the adapter with a plain Java array (e.g., String[]). Try using something that implements the java.util.List interface (e.g., ArrayList).

提交回复
热议问题