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


Java VerificationError类代码示例

本文整理汇总了Java中com.stepstone.stepper.VerificationError的典型用法代码示例。如果您正苦于以下问题:Java VerificationError类的具体用法?Java VerificationError怎么用?Java VerificationError使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


VerificationError类属于com.stepstone.stepper包,在下文中一共展示了VerificationError类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: TabsStepperType

import com.stepstone.stepper.VerificationError; //导入依赖的package包/类
public TabsStepperType(StepperLayout stepperLayout) {
    super(stepperLayout);
    mTabsContainer = (TabsContainer) stepperLayout.findViewById(R.id.ms_stepTabsContainer);
    mTabsContainer.setSelectedColor(stepperLayout.getSelectedColor());
    mTabsContainer.setUnselectedColor(stepperLayout.getUnselectedColor());
    mTabsContainer.setErrorColor(stepperLayout.getErrorColor());
    mTabsContainer.setDividerWidth(stepperLayout.getTabStepDividerWidth());
    mTabsContainer.setListener(stepperLayout);

    if (stepperLayout.isInEditMode()) {
        //noinspection ConstantConditions
        mTabsContainer.setSteps(Arrays.asList(
                new StepViewModel.Builder(null).setTitle("Step 1").create(),
                new StepViewModel.Builder(null).setTitle("Step 2").setSubtitle("Optional").create())
        );
        mTabsContainer.updateSteps(0, new SparseArray<VerificationError>(), false);
        mTabsContainer.setVisibility(View.VISIBLE);
    }
}
 
开发者ID:stepstone-tech,项目名称:android-material-stepper,代码行数:20,代码来源:TabsStepperType.java

示例2: updateState

import com.stepstone.stepper.VerificationError; //导入依赖的package包/类
/**
 * Updates the UI state of the tab and sets {@link #mCurrentState} based on the arguments.
 *  @param error   not null if an error/warning should be shown, null if not an error
 * @param done    true the step was completed, if warning is not shown and this is <code>true</code> a done indicator will be shown
 * @param current true if this is the currently selected step
 * @param showErrorMessageEnabled true if an error message below step title should appear when an error occurs
 */
public void updateState(@Nullable final VerificationError error, final boolean done, final boolean current, boolean showErrorMessageEnabled) {
    // FIXME: 05/03/2017 stop tabs from changing positions due to changing font type (does not happen e.g. on API 16, investigate further)
    mStepTitleTextView.setTypeface(current ? mBoldTypeface : mNormalTypeface);

    if (error != null) {
        mCurrentState.changeToWarning(showErrorMessageEnabled ? error.getErrorMessage() : null);
    } else if (done) {
        mCurrentState.changeToDone();
    } else if (current) {
        mCurrentState.changeToActiveNumber();
    } else {
        mCurrentState.changeToInactiveNumber();
    }
}
 
开发者ID:stepstone-tech,项目名称:android-material-stepper,代码行数:22,代码来源:StepTab.java

示例3: updateSteps

import com.stepstone.stepper.VerificationError; //导入依赖的package包/类
/**
 * Changes the position of the current step and updates the UI based on it.
 * @param currentStepPosition new current step
 * @param stepErrors map containing error state for step positions
 * @param showErrorMessageEnabled true if an error message below step title should appear when an error occurs
 */
public void updateSteps(int currentStepPosition, SparseArray<VerificationError> stepErrors, boolean showErrorMessageEnabled) {
    int size = mStepViewModels.size();
    for (int i = 0; i < size; i++) {
        StepTab childTab = (StepTab) mTabsInnerContainer.getChildAt(i);
        boolean done = i < currentStepPosition;
        final boolean current = i == currentStepPosition;

        VerificationError error = stepErrors.get(i);
        childTab.updateState(error, done, current, showErrorMessageEnabled);
        if (current) {
            mTabsScrollView.smoothScrollTo(childTab.getLeft() - mContainerLateralPadding, 0);
        }
    }
}
 
开发者ID:stepstone-tech,项目名称:android-material-stepper,代码行数:21,代码来源:TabsContainer.java

示例4: onError

import com.stepstone.stepper.VerificationError; //导入依赖的package包/类
@Override
public void onError(VerificationError error) {
    // ignore
}
 
开发者ID:firejake308,项目名称:Show-And-Sell,代码行数:5,代码来源:TutorialActivity.java

示例5: verifyStep

import com.stepstone.stepper.VerificationError; //导入依赖的package包/类
@Override
public VerificationError verifyStep() {
    // you literally can't screw this up
    return null;
}
 
开发者ID:firejake308,项目名称:Show-And-Sell,代码行数:6,代码来源:TutorialActivity.java

示例6: verifyStep

import com.stepstone.stepper.VerificationError; //导入依赖的package包/类
@Override
    public VerificationError verifyStep() {
//        return new VerificationError("A message");
        return null;
    }
 
开发者ID:securityfirst,项目名称:Umbrella_android,代码行数:6,代码来源:StepFragment.java

示例7: onError

import com.stepstone.stepper.VerificationError; //导入依赖的package包/类
@Override
public void onError(@NonNull VerificationError error) {
    formHolder.startAnimation(AnimationUtils.loadAnimation(getActivity(), R.anim.shake_error));
}
 
开发者ID:securityfirst,项目名称:Umbrella_android,代码行数:5,代码来源:StepFragment.java

示例8: onError

import com.stepstone.stepper.VerificationError; //导入依赖的package包/类
@Override
public void onError(VerificationError verificationError) {}
 
开发者ID:securityfirst,项目名称:Umbrella_android,代码行数:3,代码来源:FormActivity.java

示例9: setError

import com.stepstone.stepper.VerificationError; //导入依赖的package包/类
/**
 * Called to set whether the stepPosition has an error or not, changing it's appearance.
 * @param stepPosition the step to set the error
 * @param error error instance or null if no error
 */
public void setError(int stepPosition, @Nullable VerificationError error) {
    mStepErrors.put(stepPosition, error);
}
 
开发者ID:stepstone-tech,项目名称:android-material-stepper,代码行数:9,代码来源:AbstractStepperType.java

示例10: getErrorAtPosition

import com.stepstone.stepper.VerificationError; //导入依赖的package包/类
/**
 * Checks if there's an error for the step.
 *
 * @param stepPosition the step to check for error
 * @return an error for this step or null if no error
 */
@Nullable
public VerificationError getErrorAtPosition(int stepPosition) {
    return mStepErrors.get(stepPosition);
}
 
开发者ID:stepstone-tech,项目名称:android-material-stepper,代码行数:11,代码来源:AbstractStepperType.java


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