2
I’m having the following problem, and I’d like everyone’s help please.
I have an Activity, in which, if you press btn1, it will happen Boolean mesa1 = true;
Just like for btn2... successively.
When mesa1 is true, the knob changes color, and opens a new Activity. When I do this in btn2, the knob changes color, and opens the Activity. Only when returning, btn1 is no longer the color changed, IE, mesa1 is false;
How to maintain: Boolean mesa1 = true; regardless of how many activiys I open ?
The value of the variables should be kept, so it seems that when you return to the main activicty the images are reset, so you should do a check on all tables. example, create a method that does a check on all tables, if mes1 is true, then change image, and so on to all tables.
– Skywalker
If the variables are not being maintained, the problem may be the scope in which you created them, or by calling the new request acitivity you may be finishing the main Activity with the Finish method. Make sure it can’t be that. Without the source code it’s very hard to know what might be going on, it’s just subjections.
– Skywalker
No, there’s no Finish(), man, I just need to know how to keep the data. My problem is not a "mistake", there is no way I send the code and I have not done anything about keeping data.. that’s what I need.
– Nilzon Martins