0
Follow the code of gridview. It is in this same Activity that I want to call the actions of the grid.
//Grid VIew...set grid view item
Bitmap homeIcon = BitmapFactory.decodeResource(this.getResources(), R.drawable.teste_cor);
Bitmap userIcon1 = BitmapFactory.decodeResource(this.getResources(), R.drawable.teste_fest);
Bitmap userIcon2 = BitmapFactory.decodeResource(this.getResources(), R.drawable.teste_paris);
Bitmap userIcon3 = BitmapFactory.decodeResource(this.getResources(), R.drawable.teste_news);
Bitmap userIcon4 = BitmapFactory.decodeResource(this.getResources(), R.drawable.teste_media);
Bitmap userIcon5 = BitmapFactory.decodeResource(this.getResources(), R.drawable.local_gar);
gridArray.add(new Item(homeIcon,"menu1"));
gridArray.add(new Item(userIcon1,"menu2"));
gridArray.add(new Item(userIcon2,"menu3"));
gridArray.add(new Item(userIcon3,"menu4"));
gridArray.add(new Item(userIcon4,"menu5"));
gridArray.add(new Item(userIcon5,"menu6"));
gridView = (GridView) findViewById(R.id.gridView);
customGridAdapter = new CustomGridViewAdapter(this, R.layout.row_grid, gridArray);
gridView.setAdapter(customGridAdapter);