Today I was testing my app (wich is a very simple note application) but some strange behaviour occur .
-
The app consists of a big ListView which displays all the notes and a button to make a new note (activity A).
-
When I press the button to “Add new note”,it takes me to the activity B
(with all the fields like title and text). -
When I press “Add” ,it take me back to the activity A and displays ok
the new Note .
The thing is that I started pressing BACK and it began to take me “back in time” where some notes were still not created,until it reached the time they were 0 notes .
Since I am new to Android devel ,is this normal or is it something wrong with my app ?
When you go from one activity to another then you should finish your activity and then start new activity.
Try the below code: