Skip to content Skip to sidebar Skip to footer

Android - GridView Item Click Opens All Layouts

I have this problem. I have a gridView and when I click an item, it should open a layout BUT every button I click, opens every layout so if I press back button I need to press it 1

Solution 1:

You are missing break statement in your switch case.

Add break after every case, like this...

case 0:               
   Intent ammissione = (new Intent(List.this, Ammissione.class));             
   startActivity(ammissione);
   break;

See The Switch Statement


Post a Comment for "Android - GridView Item Click Opens All Layouts"