Java tutorial
//package com.java2s; import android.widget.EditText; public class Main { public static boolean validarCamposVazios(EditText... editTexts) { boolean isValido = true; for (EditText editText : editTexts) { if (editText.getText().toString().isEmpty()) { isValido = false; } else { editText.setError(null); } } return isValido; } }