Merge "SupportLeanbackDemo: add example finishGuidedStepFragments()" into mnc-ub-dev
This commit is contained in:
@@ -173,7 +173,7 @@ public class GuidedStepActivity extends Activity {
|
||||
if (action.getId() == CONTINUE) {
|
||||
GuidedStepFragment.add(fm, new SecondStepFragment(), android.R.id.content);
|
||||
} else {
|
||||
getActivity().finish();
|
||||
finishGuidedStepFragments();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -348,15 +348,17 @@ public class GuidedStepActivity extends Activity {
|
||||
@Override
|
||||
public void onCreateActions(List<GuidedAction> actions, Bundle savedInstanceState) {
|
||||
addAction(actions, CONTINUE, "Done", "All finished");
|
||||
addAction(actions, BACK, "Back", "Forgot something...");
|
||||
addAction(actions, BACK, "Start Over", "Let's try this again...");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGuidedActionClicked(GuidedAction action) {
|
||||
if (action.getId() == CONTINUE) {
|
||||
getActivity().finish();
|
||||
finishGuidedStepFragments();
|
||||
} else {
|
||||
getFragmentManager().popBackStack();
|
||||
// pop 4, 3, 2
|
||||
popBackStackToGuidedStepFragment(SecondStepFragment.class,
|
||||
FragmentManager.POP_BACK_STACK_INCLUSIVE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ public class GuidedStepSupportActivity extends FragmentActivity {
|
||||
if (action.getId() == CONTINUE) {
|
||||
GuidedStepSupportFragment.add(fm, new SecondStepFragment(), android.R.id.content);
|
||||
} else {
|
||||
getActivity().finish();
|
||||
finishGuidedStepSupportFragments();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -350,15 +350,17 @@ public class GuidedStepSupportActivity extends FragmentActivity {
|
||||
@Override
|
||||
public void onCreateActions(List<GuidedAction> actions, Bundle savedInstanceState) {
|
||||
addAction(actions, CONTINUE, "Done", "All finished");
|
||||
addAction(actions, BACK, "Back", "Forgot something...");
|
||||
addAction(actions, BACK, "Start Over", "Let's try this again...");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGuidedActionClicked(GuidedAction action) {
|
||||
if (action.getId() == CONTINUE) {
|
||||
getActivity().finish();
|
||||
finishGuidedStepSupportFragments();
|
||||
} else {
|
||||
getFragmentManager().popBackStack();
|
||||
// pop 4, 3, 2
|
||||
popBackStackToGuidedStepSupportFragment(SecondStepFragment.class,
|
||||
FragmentManager.POP_BACK_STACK_INCLUSIVE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user