SetupWizard. Let each page optionally handle deferred actions on finish
Change-Id: I040d8dd472cc73ee034b3dbe8177a5b2e3314918
This commit is contained in:
parent
645354b463
commit
e39d98bdb3
@ -133,6 +133,12 @@ public abstract class AbstractSetupData extends BroadcastReceiver implements Set
|
||||
}
|
||||
}
|
||||
|
||||
public void finishPages() {
|
||||
for (Page page : mPageList.values()) {
|
||||
page.onFinishSetup();
|
||||
}
|
||||
}
|
||||
|
||||
public Bundle save() {
|
||||
Bundle bundle = new Bundle();
|
||||
for (Page page : mPageList.values()) {
|
||||
|
@ -44,6 +44,7 @@ public interface Page {
|
||||
public boolean doPreviousAction();
|
||||
public boolean doNextAction();
|
||||
public void doLoadAction(Activity context, int action);
|
||||
public void onFinishSetup();
|
||||
public boolean onActivityResult(int requestCode, int resultCode, Intent data);
|
||||
public SetupDataCallbacks getCallbacks();
|
||||
}
|
||||
|
@ -69,6 +69,9 @@ public abstract class SetupPage implements Page {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinishSetup() {}
|
||||
|
||||
@Override
|
||||
public void doLoadAction(Activity context, int action) {
|
||||
if (context == null || context.isFinishing()) { return; }
|
||||
|
Loading…
Reference in New Issue
Block a user