Spinner does not show selected value

后端 未结 25 1364
-上瘾入骨i
-上瘾入骨i 2020-12-03 13:16

I have implemented the spinner by populating the array list through database.I can get and show the array list in my spinner array adapter but if I select the item in spinne

25条回答
  •  伪装坚强ぢ
    2020-12-03 13:45

    For me the problem is that I was using getApplicationContext(). When I replace getApplicationContext() with this it works fine.

    ArrayAdapter<*> adapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, documentsCategories);
    

提交回复
热议问题