开发者

How to add ArrayList<My class> in ArrayAdapter for spinner?

private ArrayAdapter spn_1;
ArrayList<My Class> result;
 spn_1 = new ArrayAdapter(this, android.R.layout.simple_spinner_item, result);

 spn_1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
            m_spn_gender.setAdapter(spn_1);

I try like this but it wrong

what should I d开发者_StackOverflowo?


You need to put objects in the ArrayList.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜