Pergunta

Eu estava procurando uma maneira de excluir uma determinada atividade da pilha de histórico e encontrei uma solução Aqui (Wakkas's Anwer) .No entanto, se eu fechar o aplicativo com esta atividade aberta, e.Ao pressionar o botão home e posteriormente retornar a ele, a atividade não é restaurada.

Se eu remover o atributo "nohistory", ele está voltando e também restaurado após a morte.

Existe uma maneira de não aparecer na pilha de histórico (= não quer voltar para ele pressionando o botão de volta na próxima atividade) sem esse comportamento?

Atenciosamente, Água-viva

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top