Skip to content

Instantly share code, notes, and snippets.

@AliAzaz
Created December 8, 2019 10:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AliAzaz/b09e12ee346f283dfbbc30f289f77527 to your computer and use it in GitHub Desktop.
Save AliAzaz/b09e12ee346f283dfbbc30f289f77527 to your computer and use it in GitHub Desktop.
Validation functions
fun emptyTextBox(context: Context, txt: EditText, toggleFlag: Boolean = true): Boolean
fun emptyTextView(context: Context, txt: TextView, toggleFlag: Boolean = true): Boolean
fun emptyCustomTextBox(context: Context, txt: TextView, msg: String, toggleFlag: Boolean = true): Boolean
fun emptyEditTextPicker(context: Context, txt: EditText, toggleFlag: Boolean = true): Boolean
fun rangeTextBox(context: Context, txt: EditText, min: Int, max: Int, type: String, toggleFlag: Boolean = true): Boolean
fun rangeTextBox(context: Context, txt: EditText, min: Double, max: Double, type: String, toggleFlag: Boolean = true): Boolean
fun emptySpinner(context: Context, spin: Spinner, toggleFlag: Boolean = true): Boolean
fun emptyRadioButton(context: Context, rdGrp: RadioGroup, rdBtn: RadioButton, toggleFlag: Boolean = true): Boolean
fun emptyCheckBox(context: Context, cbx: CheckBox, toggleFlag: Boolean = true): Boolean
fun emptyMultiCheckBox(context: Context, container: ViewGroup, toggleFlag: Boolean = true): Boolean
fun emptyCheckingContainer(context: Context, view: View, toggleFlag: Boolean = true): Boolean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment