Text on spinner is white on a white background

后端 未结 8 1963
半阙折子戏
半阙折子戏 2020-12-13 09:01

The text on my spinners is white, and I have no idea why.

\"enter

This is my x

8条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-13 09:35

    I have same problem and have found the answer. You dont use application context, instead, just use getActivity() (if you are in fragment) or this (if you are in activity), it will work

     dateAdapter = new ArrayAdapter(**this**,
            android.R.layout.simple_spinner_item, list);
    

提交回复
热议问题