Android : OnStop 후 "NoHistory"속성을 사용하여 활동으로 돌아가는 방법은 무엇입니까?

StackOverflow https://stackoverflow.com/questions/6045558

문제

History Stack에서 특정 활동을 삭제하고 솔루션 여기 (Wakkas 's Anwer) .그러나이 활동으로 앱을 닫으면 예를 들어 왔습니다.홈 버튼을 눌러 나중에 복귀하면 활동이 복원되지 않습니다.

"nohistory"속성을 제거하면 다시오고 살해 후 복원됩니다.

이 동작없이 히스토리 스택 (= 다음 활동에서 뒤로 버튼을 누르기를 원하지 않으려 고)이 작동하지 않고이 동작없이 나타나지 않는 방법이 있습니까?

종류의 안부, 해파리

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top