I am making two screens A and B. Let's say they are screenA & screenB.
In screenA, I use setScreen(screenB) to pass the screenA to screenB.
In screenB, I have two methods two pass the screenB back to screenA.
Method 1
I create an imageButton called "Back". When I press the imageButton, it will use setScreen(screenA) to pass the screenB back to screen A.
Method 2
I use the soft key Keys.BACK to pass the screenB back to screenA.
My question s are:
1) Is method1 the same as method2?
2) Is my concept below correct?
Method1 Stack: screenA-->screenB on top-->Another ScreenA on top.
Mehod2 Stack: A-->screenB on top, then screenB is remove (if Keys.BACK is pressed) and back to A only.
If my concept is correct, will Method1 use more memory than Method2?
I hope you can understand my question and sorry for any troublesome.
Thanks for reply.