I'm trying one thing: in my Activity I have 30 buttons inside them for everyone there is a number that goes from 1 to 30. Now I want to assign each an Intent that opens the same Activity but passing the corresponding number. How can I do?
public void ApriTavolo(View v) { Bundle extras = new Bundle(); // pass the value of button extras.putString("one", one); // Perform action on click Intent activityChangeIntent = new Intent(MainActivity.this, Interno_tavolo.class); activityChangeIntent.putExtras(extras); startActivity(activityChangeIntent); }