【发布时间】:2014-09-10 18:46:56
【问题描述】:
我正在使用WizarDroid 库,并创建了一个简单的向导。
我要做的是在最后一步我想禁用底部的 Back 按钮。我到处搜索,但文档对我没有帮助。
这是我的基本向导代码:
public class FormWizard extends BasicWizardLayout
{
public FormWizard()
{
super();
}
@Override
public WizardFlow onSetup()
{
return new WizardFlow.Builder()
/*
* Mark this step as 'required', preventing the user from advancing to the
* next step without selecting one option.
*/
.addStep(Form1.class, true)
.addStep(Form2.class, true)
.addStep(Form3.class)
.create();
}
@Override
public void onWizardComplete()
{
super.onWizardComplete();
// Terminate the wizard
getActivity().finish();
}
}
Form1、Form2 和 Form3 只是扩展 WizardStep 并向用户显示一些数据。
在文档中定义了 wizard.goNext(); 方法,但在我的场景中不可用。
我只是想禁止用户在到达 Form3 或最后一步后返回。
【问题讨论】: