android - Is it possible to save the state of a button in one activity and then pass it on to a new activity? -
My question tells too much what I have to do
My view is that if we say (Activity 1 is pressed from button 1) and activity b loads, so I want to move into button 1 (pressure or not) in Activity B and I want to do something with it. For example:
if after (button1.isChecked ()) {// do something}
In the first activity, you can use it:
intent = intent (new, this is your second activity category); Intent.putExtra ("button position", "you position button or right"); StartActivity; And in the second activity inside increate, you will use it:
boolean getButtonStatus = getIntent (). GetBooleanExtra ("buttonStatus", incorrect);
Comments
Post a Comment