好库网
package com.vanco.abplayer.fragment;

import java.util.ArrayList;
import java.util.List;

import com.vanco.abplayer.R;
import com.vanco.abplayer.adapter.AreaGridAdapter;
import com.vanco.abplayer.adapter.GameListAdapter;
import com.vanco.abplayer.model.AreaItem;
import com.vanco.abplayer.model.GameItem;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.GridView;
import android.widget.ListView;

public class GamesCenterFragment extends Fragment{
	private ListView gameListView;
	private ArrayList<GameItem> gameList = new ArrayList<GameItem>();
	private int[] gameimages = new int[]{R.drawable.hxzj_gamecenter_smallbanner,R.drawable.wcat_list,
			R.drawable.xwy_list,R.drawable.mlk,R.drawable.img_bh2,
			R.drawable.w};
	private String[] gametexts = new String[]{"骞绘兂鎴樺К","鐧界尗璁″垝","渚犵墿璇?,"姊呴湶鍙墿璇?,"宕╁潖瀛﹂櫌2","涓栫晫2"};
	private String[] gamepaths = new String[]{"链接已屏蔽;,"链接已屏蔽;,
			"链接已屏蔽;,"链接已屏蔽;,"链接已屏蔽;,
			"链接已屏蔽;};
	@Override
	public void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
	   	 for (int i = 0; i < gameimages.length; i++) {
	   		    GameItem item = new GameItem();
				item.setImg(gameimages[i]);
				item.setText(gametexts[i]);
				item.setPath(gamepaths[i]);
				gameList.add(item);
			}
	}

     @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container,
             Bundle savedInstanceState) {
         View rootView = inflater.inflate(R.layout.fragment_gamecenter, container, false);
         gameListView = (ListView)rootView.findViewById(R.id.GameListView);
         gameListView.setAdapter(new GameListAdapter(getActivity(), gameList));
         return rootView;
     }

}