Fixes
This commit is contained in:
parent
c7af20f127
commit
eecfd57be4
@ -0,0 +1,22 @@
|
|||||||
|
package org.solovyev.android.calculator.release;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.support.v4.app.Fragment;
|
||||||
|
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
|
public class ChooseThemeReleaseNoteStep extends ReleaseNoteStep {
|
||||||
|
public ChooseThemeReleaseNoteStep(Integer version) {
|
||||||
|
super(version);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ChooseThemeReleaseNoteStep(@Nonnull Bundle arguments) {
|
||||||
|
super(arguments);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nonnull
|
||||||
|
@Override
|
||||||
|
public Class<? extends Fragment> getFragmentClass() {
|
||||||
|
return ChooseThemeReleaseNoteFragment.class;
|
||||||
|
}
|
||||||
|
}
|
@ -3,8 +3,7 @@ package org.solovyev.android.calculator.wizard;
|
|||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.app.Fragment;
|
import org.solovyev.android.calculator.release.ChooseThemeReleaseNoteStep;
|
||||||
import org.solovyev.android.calculator.release.ChooseThemeReleaseNoteFragment;
|
|
||||||
import org.solovyev.android.calculator.release.ReleaseNoteStep;
|
import org.solovyev.android.calculator.release.ReleaseNoteStep;
|
||||||
import org.solovyev.android.calculator.release.ReleaseNotes;
|
import org.solovyev.android.calculator.release.ReleaseNotes;
|
||||||
import org.solovyev.android.wizard.*;
|
import org.solovyev.android.wizard.*;
|
||||||
@ -90,13 +89,7 @@ public class CalculatorWizards implements Wizards {
|
|||||||
for (Integer version : versions) {
|
for (Integer version : versions) {
|
||||||
switch (version) {
|
switch (version) {
|
||||||
case 136:
|
case 136:
|
||||||
wizardSteps.add(new ReleaseNoteStep(version) {
|
wizardSteps.add(new ChooseThemeReleaseNoteStep(version));
|
||||||
@Nonnull
|
|
||||||
@Override
|
|
||||||
public Class<? extends Fragment> getFragmentClass() {
|
|
||||||
return ChooseThemeReleaseNoteFragment.class;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
wizardSteps.add(new ReleaseNoteStep(version));
|
wizardSteps.add(new ReleaseNoteStep(version));
|
||||||
|
@ -9,6 +9,8 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import org.solovyev.android.calculator.R;
|
import org.solovyev.android.calculator.R;
|
||||||
|
import org.solovyev.android.calculator.release.ChooseThemeReleaseNoteFragment;
|
||||||
|
import org.solovyev.android.calculator.release.ChooseThemeReleaseNoteStep;
|
||||||
import org.solovyev.android.calculator.release.ReleaseNoteFragment;
|
import org.solovyev.android.calculator.release.ReleaseNoteFragment;
|
||||||
import org.solovyev.android.calculator.release.ReleaseNoteStep;
|
import org.solovyev.android.calculator.release.ReleaseNoteStep;
|
||||||
import org.solovyev.android.wizard.Wizard;
|
import org.solovyev.android.wizard.Wizard;
|
||||||
@ -41,6 +43,10 @@ public abstract class WizardFragment extends Fragment implements View.OnClickLis
|
|||||||
return new ReleaseNoteStep(getArguments());
|
return new ReleaseNoteStep(getArguments());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(this instanceof ChooseThemeReleaseNoteFragment) {
|
||||||
|
return new ChooseThemeReleaseNoteStep(getArguments());
|
||||||
|
}
|
||||||
|
|
||||||
for (CalculatorWizardStep step : CalculatorWizardStep.values()) {
|
for (CalculatorWizardStep step : CalculatorWizardStep.values()) {
|
||||||
if (step.getFragmentClass().equals(getClass())) {
|
if (step.getFragmentClass().equals(getClass())) {
|
||||||
return step;
|
return step;
|
||||||
|
Loading…
Reference in New Issue
Block a user