how to set alternate colors on gridview cells without using Base adapter in Fragment

view story

http://stackoverflow.com – I want to set colors on alternate cells of my gridview which i have filled with arrayadapter items and i dont want to extend BaseAdapter class also: code i have used: public class Fragment2 extends Fragment { public final static String EXTRA_MESSAGE = "com.MESSAGE"; TextView selection; public int idToModify; DataManipulator dm; private GridView gridView; public static ArrayList<String> ArrayName = new ArrayList<String>(); List<Object[]> names2 = null; String[] stg1; String[] stgid; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, (HowTos)