0

I am working on the application where I am using the TabActivity.

Now what the problem I am facing is Suppose I have two Screens say Screen A and Screen B.

Now when I am in Screen A and I enter the Data in the EditBox of it and then I switch to the next Screen i.e. Screen B and then I enter some data in the EditBox of the Screen B also.

Now when I get back to the Screen A, I can view the Data that I had entered in the EditBox of Screen A(Which I can see), but when I again navigate to the Screen B, I need to see the Data that I had entered in the Screen B before coming back to Screen A.

I am not able to sustain the Data in the Screen B once I come back to Screen A and then again coming back to Screen B.

I know the question could be good enough to chew your mind, but the Issue is doing exactly the same for me.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
David Brown
  • 4,783
  • 17
  • 50
  • 75

1 Answers1

1

Use Shared Preferences to store your data. When you navigate from one activity to another activity. It may result in DATA loss

So use Shared Preferences