我一直在尝试动态更新我的微调器在android中,但我尝试的一切都没有工作.
这是我用来更新微调器的以下代码.
typeList = dbAdapter.getList(); //array list with the values
adapter.notifyDataSetChanged();
groupSpinner.postInvalidate();
groupSpinner.setAdapter(adapter);
Run Code Online (Sandbox Code Playgroud)
typeList的值是正确的,但它们没有在Spinner中更新.