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...

case0:               
   Intent ammissione = (newIntent(List.this, Ammissione.class));             
   startActivity(ammissione);
   break;

See The Switch Statement

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