本文整理汇总了Java中com.stepstone.stepper.StepperLayout.setAdapter方法的典型用法代码示例。如果您正苦于以下问题:Java StepperLayout.setAdapter方法的具体用法?Java StepperLayout.setAdapter怎么用?Java StepperLayout.setAdapter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.stepstone.stepper.StepperLayout
的用法示例。
在下文中一共展示了StepperLayout.setAdapter方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.stepstone.stepper.StepperLayout; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tutorial);
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(true);
}
mVisible = true;
mStepper = (StepperLayout) findViewById(R.id.stepper_layout);
mStepper.setAdapter(new StepperAdapter(getSupportFragmentManager(), this));
mStepper.setListener(this);
// Set up the user interaction to manually show or hide the system UI.
ImageView mainContent = (ImageView) findViewById(R.id.tutorialImg);
mainContent.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
toggle();
}
});
// Upon interacting with UI controls, delay any scheduled hide()
// operations to prevent the jarring behavior of controls going away
// while interacting with the UI.
//findViewById(R.id.dummy_button).setOnTouchListener(mDelayHideTouchListener);
}
示例2: onCreate
import com.stepstone.stepper.StepperLayout; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
UmbrellaUtil.setStatusBarColor(this, getResources().getColor(R.color.umbrella_purple_dark));
int formId = getIntent().getExtras().getInt("form_id", -1);
if (formId < 0) {
Toast.makeText(this, "Not a valid form", Toast.LENGTH_SHORT).show();
finish();
return;
}
try {
f = Global.INSTANCE.getDaoForm().queryForId(String.valueOf(formId));
} catch (SQLException e) {
e.printStackTrace();
}
if (f==null) {
Toast.makeText(this, "Not a valid form", Toast.LENGTH_SHORT).show();
finish();
return;
}
sessionId = getIntent().getExtras().getLong("session_id", -1);
if (sessionId<0) {
sessionId = System.currentTimeMillis()/1000;
}
setTitle(f.getTitle());
int startingStepPosition = savedInstanceState != null ? savedInstanceState.getInt(CURRENT_STEP_POSITION_KEY) : 0;
mStepperLayout = (StepperLayout) findViewById(R.id.stepperLayout);
adapter = new FragmentStepAdapter(getSupportFragmentManager(), this, f, sessionId);
mStepperLayout.setAdapter(adapter, startingStepPosition);
mStepperLayout.setListener(this);
}