Question

Je cherchais un moyen de supprimer une certaine activité de la pile d'histoire et j'ai trouvé une solution ici (Anwer de Wakkas) .Cependant, si je ferme l'application avec cette activité ouverte par ex.En appuyant sur le bouton Home et revenez-y ultérieurement, l'activité n'est pas restaurée.

Si je supprimais l'attribut "nohistory", il revient et aussi restauré après une tuerie.

y a-t-il un moyen de ne pas apparaître sur la pile d'historique (= ne veut pas y revenir en appuyant sur le bouton arrière de l'activité suivante) sans ce comportement?

genre Cordialement, Jellyfish

Était-ce utile?

La solution

I don't think so - leaving the activity via the "Home" button and opening a new activity will have the same effect: if your activity is not in the history stack, it should not be restored.

Instead of using the "noHistory" attribute, couldn't you just call finish() as you launch your next activity? It should not re-appear when you then hit the "back" button.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top