Parent Activity Loses Data When Onbackpressed() Is Called
I have a listview in subsection activity when I click on it, it opens up tabbed activity. Now when I press up navigation button on top left corner and go back to parent activity, t
Solution 1:
This may solve your problem
Put this in your AlgorithmActivity.java and remove your code.
@OverridepublicbooleanonOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
onBackPressed();
returntrue;
}
returnsuper.onOptionsItemSelected(item);
}
Post a Comment for "Parent Activity Loses Data When Onbackpressed() Is Called"