如何在GridView中显示2D数组

时间:2013-01-19 09:39:07

标签: java android gridview adapter multidimensional-array

我有2D数组:

    static final String[][] numbers = new String[][] {};
    numbers[0][0] = "A";
    numbers[0][1] = "b";
    numbers[0][2] = "c";

    numbers[1][0] = "d";
    numbers[1][1] = "e";
    numbers[1][2] = "f";

    numbers[2][0] = "g";
    numbers[2][1] = "h";
    numbers[2][2] = "z";

    gv = (GridView)findViewById(R.id.gridView);

如何使用适配器将其添加到GridView?

0 个答案:

没有答案