I'm trying to change the background color of my GridView. This works perfectly with this code:
GridView gv = (GridView) findViewById(R.id.gvSpeelveld);
gv.setBackgroundColor(Color.RED);
But now I want to change the color of different cells. For example: Row 2 cell 2 should be blue. What method should I use to get the GridView item on a specific position to change the color?
I tried with these methods, but it didn't work out well
//Attempt 1
gv.getChildAt(1).setBackgroundColor(Color.BLUE);
//Attempt 2 (returns data, not the whole object)
gv.getItemAtPosition(5);
So how can I the content of different cells?