Handle backstacks in android and UI changes