SimpleAdapter, Text and Image in spinner

后端 未结 4 1130
没有蜡笔的小新
没有蜡笔的小新 2020-12-28 21:59

I\'ve got a little problem. Well, let me first state what I\'m trying to accomplish. I had a spinner that pulls strings out of a stored array. Like so, you don\'t need to r

4条回答
  •  Happy的楠姐
    2020-12-28 22:17

    Yes @Vicky you are right. For image it should be

    ((ImageView) convertView.findViewById(R.id.icon)) .setBackgroundResource((Integer) data.get("Icon"));
    

提交回复
热议问题