I have an activity lets call it LeanbackSettingsActivity. I have 3 Fragments in it.
'FirstStepFragment' - Which houses a couple options to go to one of the other 2 fragments: Option1 -> SubFragment1 Option2 -> SubFragment2
All 3 fragments extend 'GuidedStepFragment'.
If I press the 'Back' button on my Android TV remote while in SubFragment1 or SubFragment2, it goes back to FirstStepFragment. That's fine, but if I press the back again (when I'm in FirstStepFragment), it goes to a blank screen. Press it again, and it exits.
I'm assuming its the activity that is displaying while the screen is blank.
How can I fix the behavior so when I leave FirstStepFragment it also finishes the activity?
Here's the onCreate from my activity:
@Override
protected void onCreate(Bundle savedInstanceState) {
Log.d(TAG, "onCreate");
super.onCreate(savedInstanceState);
if (savedInstanceState == null) {
GuidedStepFragment.add(getFragmentManager(), new FirstStepFragment());
}
}