Created an adapter for GridView