android activity backstack management
问题 My app shows some content (video,pdf,img, etc ) and within every content I can start another content. What I want is to have only "one back history". For example, if my activity history is like this: VideoActivityIns1->PdfActivityIns1->VideoActivityIns2 I need to go back from VideoActivityIns2 to PdfActivityIns1, but one step back is should be MainActivity of my app. How can I do this? Any help would be appreciated 回答1: Each activity has activity lifecycle methods you can override to achieve