This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Manually handle activity stack | |
// Android has many different mechanism on how to handle activities stack on each version | |
// Instead rely on native tool, we create this class to handle the stack | |
// | |
// How does it work? | |
// | |
// Make sure all of your activities is inherited from a `BaseActivity` | |
// When an activity launched, call `super.onCreate()` method from `BaseActivity` | |
// `BaseActivity@onCreate` is simple, just call `addActivity(this)` method to add your activity to the stack | |
// Don't forget to remove it from stack, by calling `removeActivity(this)`, when the activity is destroyed |