i am curious how i go about using the
putExtra("something", something);
in a intent to a new activity inside my application,
Intent i = new Intent(getApplicationContext(), MainActivity.class);
i.putExtra("something", something)
startActivity(i);
I need to know how i would the sending and receiving end would look like, For Loading a specific layout file depending on what was sent via the putExtra in the intent.
So if i send the i.putExtra(“a”, a) on the receiving end, it would create a content view with R.layout.a_layout.xml
but if i sent i.putExtra(“b”, b) it would load R.layout.b_layout.xml
Any ideas?
One nifty way of doing this would be to say:
to send the correct layout to your new class. Then in the new class, you can use: