So I have a Button
in FirstActivity.java
which when you press leads you to a second activity: SecondActivity.java
, which has another button BackButton
that leads you back to FirstActivity.java
. The code in the first activity allows you to change the layout according to different conditions. Is there a way that if the layout of FirstActivity.java
is changed, you press the Button
to go to the second activity, then when you press the BackButton
to go back to FirstActivity.java
, the layout changes will be saved in the first activity?
Asked
Active
Viewed 69 times
-2

Jose Rodriguez
- 9,753
- 13
- 36
- 52
-
provide code for how you start SecondActivity from FirstActivity – Mushirih Dec 11 '16 at 21:46
-
` Button Button = (Button) findViewById(R.id.button); Button.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { startActivity(new Intent(FirstActivity.this, SecondActivity.class)); } }); ` – Srinath Vasudevan Dec 11 '16 at 21:51
-
http://stackoverflow.com/questions/7950286/save-a-activity-in-android-when-moved-to-another-activity – André Abboud Dec 11 '16 at 21:57
1 Answers
0
You can use putExtra for send data to SecondActivity, and return data to onActivityResult.

actin
- 43
- 1
- 6