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


Java GuidedAction.ACTION_ID_NEXT属性代码示例

本文整理汇总了Java中android.support.v17.leanback.widget.GuidedAction.ACTION_ID_NEXT属性的典型用法代码示例。如果您正苦于以下问题:Java GuidedAction.ACTION_ID_NEXT属性的具体用法?Java GuidedAction.ACTION_ID_NEXT怎么用?Java GuidedAction.ACTION_ID_NEXT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在android.support.v17.leanback.widget.GuidedAction的用法示例。


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

示例1: onGuidedActionEditedAndProceed

@Override
public long onGuidedActionEditedAndProceed(GuidedAction action) {
    String password = action.getEditDescription().toString();
    if (password.length() > 0) {
        action.setDescription(StringUtils.toPassword(password));
    } else {
        action.setDescription(getString(R.string.account_enter_password));
    }
    if (action.getId() == PASSWORD) {
        notifyActionChanged(findActionPositionById(PASSWORD));
        presenter.passwordChanged(password);
    } else if (action.getId() == PIN) {
        notifyActionChanged(findActionPositionById(PIN));
        presenter.pinChanged(action.getEditDescription().toString());
    }
    return GuidedAction.ACTION_ID_NEXT;
}
 
开发者ID:savoirfairelinux,项目名称:ring-client-android,代码行数:17,代码来源:TVRingLinkAccountFragment.java

示例2: onGuidedActionEditedAndProceed

@Override
public long onGuidedActionEditedAndProceed(GuidedAction action) {
    if (action.getId() == PASSWORD) {
        passwordChanged(action);
    } else if (action.getId() == PASSWORD_CONFIRMATION) {
        confirmPasswordChanged(action);
    }
    return GuidedAction.ACTION_ID_NEXT;
}
 
开发者ID:savoirfairelinux,项目名称:ring-client-android,代码行数:9,代码来源:TVRingAccountCreationFragment.java

示例3: onGuidedActionEditedAndProceed

@Override
public long onGuidedActionEditedAndProceed(GuidedAction action) {

    boolean cardNumberCheck = false;
    boolean expDateCheck = false;

    if (action.getId() == ACTION_ID_CARD_NUMBER) {
        CharSequence cardNumber = action.getEditTitle();
        cardNumberCheck = isCardNumberValid(cardNumber);
        expDateCheck = isExpDateValid(findActionById(ACTION_ID_PAYMENT_EXP));
        updateOkButton(cardNumberCheck && expDateCheck);

        if (cardNumberCheck) {
            String last4Digits = cardNumber.subSequence(cardNumber.length() - 4,
                    cardNumber.length()).toString();

            if ( (Integer.parseInt(last4Digits) & 1) == 0 )
                action.setDescription(getString(R.string.wizard_example_visa,
                        last4Digits));
            else
                action.setDescription(getString(R.string.wizard_example_master,
                        last4Digits));

            return GuidedAction.ACTION_ID_NEXT;
        } else if (cardNumber.length() == 0) {
            action.setDescription(getString(R.string.wizard_example_input_card));
            return GuidedAction.ACTION_ID_CURRENT;
        } else {
            action.setDescription(getString(R.string.wizard_example_input_credit_wrong));
            return GuidedAction.ACTION_ID_CURRENT;
        }

    } else if (action.getId() == ACTION_ID_PAYMENT_EXP) {
        expDateCheck = isExpDateValid(action);
        cardNumberCheck = isCardNumberValid(findActionById(ACTION_ID_CARD_NUMBER)
                .getEditTitle());
        updateOkButton(cardNumberCheck && expDateCheck);
        if (expDateCheck) {
            return GuidedAction.ACTION_ID_NEXT;
        }
    }
    return GuidedAction.ACTION_ID_CURRENT;
}
 
开发者ID:googlesamples,项目名称:leanback-showcase,代码行数:43,代码来源:WizardNewPaymentStepFragment.java

示例4: onGuidedActionEditedAndProceed

@Override
public long onGuidedActionEditedAndProceed(GuidedAction action) {
    presenter.startAccountExport(action.getDescription().toString());
    return GuidedAction.ACTION_ID_NEXT;
}
 
开发者ID:savoirfairelinux,项目名称:ring-client-android,代码行数:5,代码来源:TVAccountExport.java


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