Spinner does not show selected value

后端 未结 25 1348
-上瘾入骨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:49

    if you have a custom adapter you should change the TextView text color

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        TextView view = (TextView) super.getView(position, convertView, parent);
        view.setTextColor(Color.parseColor("#000000"));
        return view;
    }
    

    and if you don't have a custom adapter you should just change spinner background

提交回复
热议问题