本文整理汇总了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;
}
示例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;
}
示例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;
}
示例4: onGuidedActionEditedAndProceed
@Override
public long onGuidedActionEditedAndProceed(GuidedAction action) {
presenter.startAccountExport(action.getDescription().toString());
return GuidedAction.ACTION_ID_NEXT;
}