-2

I'd like to pass a layout ID (or any id) between 2 Android activities. Any help would be appreciated.

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278

1 Answers1

0
Intent intent = new Intent(this, SecondActivity.class);
intent.putExtra("ID",10000);
startActivity(intent);

at SecondActivity.class

int ID = getIntent().getIntExtra("ID"); // getStringExtra("ID");
ZeroOne
  • 8,996
  • 4
  • 27
  • 45