private String[][] HOMEPAGE_MAINMENU = { { "创业指导", "0" }, { "人才培养", "1" }, { "信息服务", "2" }, { "管理咨询", "3" }, { "法律维权", "4" }, { "市场开拓", "5" }, { "融资担保", "6" }, { "技术创新", "7" } }; /** * 加载数据 */ private void loadData() { mAdapter = new MainGridViewAdapter(this); List<MainCatalogEntity> dataList = new ArrayList<MainCatalogEntity>(); int length = HOMEPAGE_MAINMENU.length; for (int i = 0; i < length; i++) { MainCatalogEntity entity = new MainCatalogEntity(); entity.setMenuName(HOMEPAGE_MAINMENU[i][0]); entity.setPicPath(HOMEPAGE_MAINMENU[i][1]); dataList.add(entity); } mAdapter.setData(dataList); maingridview.setAdapter(mAdapter); }