当前位置: 首页>>代码示例>>Java>>正文


Java StepperLayout.setAdapter方法代码示例

本文整理汇总了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);
}
 
开发者ID:firejake308,项目名称:Show-And-Sell,代码行数:30,代码来源:TutorialActivity.java

示例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);
}
 
开发者ID:securityfirst,项目名称:Umbrella_android,代码行数:37,代码来源:FormActivity.java


注:本文中的com.stepstone.stepper.StepperLayout.setAdapter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。