method extracted
This commit is contained in:
parent
6c578d7d09
commit
bba654f378
@ -86,10 +86,29 @@ public final class CalculatorWizardActivity extends SherlockFragmentActivity {
|
||||
|
||||
initTitle();
|
||||
initNextButton();
|
||||
initFinishButton();
|
||||
initPrevButton();
|
||||
}
|
||||
}
|
||||
|
||||
private void initFinishButton() {
|
||||
final WizardStep nextStep = flow.getNextStep(step);
|
||||
if (nextStep == null) {
|
||||
finishButton.setVisibility(VISIBLE);
|
||||
finishButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (tryGoNext()) {
|
||||
finishFlow();
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
finishButton.setVisibility(GONE);
|
||||
finishButton.setOnClickListener(null);
|
||||
}
|
||||
}
|
||||
|
||||
private void initTitle() {
|
||||
setTitle(step.getTitleResId());
|
||||
}
|
||||
@ -115,22 +134,9 @@ public final class CalculatorWizardActivity extends SherlockFragmentActivity {
|
||||
private void initNextButton() {
|
||||
final WizardStep nextStep = flow.getNextStep(step);
|
||||
if (nextStep == null) {
|
||||
finishButton.setVisibility(VISIBLE);
|
||||
finishButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (tryGoNext()) {
|
||||
finishFlow();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
nextButton.setVisibility(GONE);
|
||||
nextButton.setOnClickListener(null);
|
||||
} else {
|
||||
finishButton.setVisibility(GONE);
|
||||
finishButton.setOnClickListener(null);
|
||||
|
||||
nextButton.setVisibility(VISIBLE);
|
||||
nextButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user