怎么能插入到Stringp [

时间:2014-03-14 11:33:14

标签: android android-listview

我目前有预定义数据

String[] values = new String[] { "Android", "iPhone", "WindowsMobile", "Blackberry", "WebOS", "Ubuntu",
                "Windows7", "Max OS X", "Linux", "OS/2", "Ubuntu", "Windows7", "Max OS X", "Linux", "OS/2", "Ubuntu",
                "Windows7", "Max OS X", "Linux", "OS/2", "Android", "iPhone", "WindowsMobile" };

我想从对象数组中插入值

List<Scores> myScore = db.getAllScore();


        for (Scores cn : scor)
        {
            // how can I insert it into values

        }

1 个答案:

答案 0 :(得分:1)

试试这个。

List<Score> myScore = db.getAllScore();

        for (int i = 0,j=value.length; i < myScore.size(); i++,j++) {
            value[j]=myScore.get(i);
        }