本文整理汇总了Java中com.mobsandgeeks.saripaar.Rule类的典型用法代码示例。如果您正苦于以下问题:Java Rule类的具体用法?Java Rule怎么用?Java Rule使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Rule类属于com.mobsandgeeks.saripaar包,在下文中一共展示了Rule类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onValidationFailed
import com.mobsandgeeks.saripaar.Rule; //导入依赖的package包/类
public static void onValidationFailed(View failedView, Rule<?> failedRule) {
String message = failedRule.getFailureMessage();
if (failedView instanceof EditText) {
failedView.requestFocus();
// ((EditText) failedView).setError(Html.fromHtml("<font color=#808183>" + message + "</font>"));
((EditText) failedView).setError(Html.fromHtml("<font color=#FFFFFF>" + message + "</font>"));
}
}
开发者ID:zillachan,项目名称:LibZilla,代码行数:9,代码来源:ValidatorControllor.java
示例2: onValidationFailed
import com.mobsandgeeks.saripaar.Rule; //导入依赖的package包/类
@Override
public void onValidationFailed(View failedView, Rule<?> failedRule) {
String message = failedRule.getFailureMessage();
if (failedView instanceof EditText) {
failedView.requestFocus();
((EditText) failedView).setError(message);
} else {
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
}
}
开发者ID:se-bastiaan,项目名称:ButterRemote-Android,代码行数:12,代码来源:InstanceEditorDialogFragment.java
示例3: onValidationFailed
import com.mobsandgeeks.saripaar.Rule; //导入依赖的package包/类
@Override
public void onValidationFailed(View failedView, Rule<?> failedRule) {
String message = failedRule.getFailureMessage();
if (failedView instanceof EditText) {
failedView.requestFocus();
((EditText) failedView).setError(message);
} else {
Toast.makeText(this, message, Toast.LENGTH_SHORT).show();
}
}
开发者ID:monossido,项目名称:CoopTDMOrienteering,代码行数:12,代码来源:EndActivity.java
示例4: onValidationFailed
import com.mobsandgeeks.saripaar.Rule; //导入依赖的package包/类
@Override
public void onValidationFailed(View view, Rule<?> rule) {
if (view instanceof TextView) {
((TextView) view).setError(rule.getFailureMessage());
view.requestFocus();
}
}
开发者ID:wakhub,项目名称:monodict,代码行数:8,代码来源:CardEditDialog.java
示例5: onValidationFailed
import com.mobsandgeeks.saripaar.Rule; //导入依赖的package包/类
@Override
public void onValidationFailed(View view, Rule<?> rule) {
String message = rule.getFailureMessage();
if (view instanceof EditText) {
view.requestFocus();
((EditText) view).setError(message);
} else if (view instanceof CheckBox) {
SimpleDialogFragment.createBuilder(this, getSupportFragmentManager()).setMessage(message).show();
} else {
Toast.makeText(this, message, Toast.LENGTH_SHORT).show();
}
}
开发者ID:wemakestuff,项目名称:Teracast,代码行数:14,代码来源:RegisterActivity.java
示例6: onFailure
import com.mobsandgeeks.saripaar.Rule; //导入依赖的package包/类
@Override
public void onFailure(View failedView, Rule<?> failedRule) {
// TODO Auto-generated method stub
String message = failedRule.getFailureMessage();
if (failedView instanceof EditText) {
failedView.requestFocus();
((EditText) failedView).setError(message);
} else {
Toast.makeText(this, message, Toast.LENGTH_SHORT).show();
}
}
开发者ID:sselvakumar,项目名称:shareyourride,代码行数:13,代码来源:MainActivity.java
示例7: onValidationFailed
import com.mobsandgeeks.saripaar.Rule; //导入依赖的package包/类
@Override
public void onValidationFailed(View failedView, Rule<?> failedRule) {
validateLife.onValidationFailed(failedView, failedRule);
}
开发者ID:zillachan,项目名称:LibZilla,代码行数:5,代码来源:ValidateActivity.java
示例8: onValidationFailed
import com.mobsandgeeks.saripaar.Rule; //导入依赖的package包/类
/**
* 验证失败默认处理
*
* @param failedView
* @param failedRule
*/
public void onValidationFailed(View failedView, Rule<?> failedRule) {
ValidatorControllor.onValidationFailed(failedView, failedRule);
}
开发者ID:zillachan,项目名称:LibZilla,代码行数:10,代码来源:ValidateLife.java
注:本文中的com.mobsandgeeks.saripaar.Rule类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论