Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

testing if editText is empty java

if (TextUtils.isEmpty(editText.getText().toString()))
{
    Toast.makeText(MainActivity.this, 
                   "Empty field not allowed!",
                   Toast.LENGTH_SHORT).show();
}
else 
{
    Toast.makeText(MainActivity.this,
                  "Proceed..",
                  Toast.LENGTH_SHORT).show();
}
Comment

PREVIOUS NEXT
Code Example
Java :: android back navigation 
Java :: java reverse value of boolean 
Java :: how to deselect radio button in java 
Java :: javax notblank not working 
Java :: how to send file in request body rest assured 
Java :: java deltaTime 
Java :: bukkit block place event 
Java :: javaee jsp convert int to string 
Java :: java jtextfield text bold 
Java :: from string to double andoird studio 
Java :: iterate over string java 
Java :: bukkit give player effect 
Java :: null checker on addAll java 
Java :: android hide textview 
Java :: How to generate all possible k combinations of numbers between 1 and n, in Java? 
Java :: java int to octal 
Java :: how to convert a hexadecimal number to a decimal inside a println in java 
Java :: regex validation for special characters in java 
Java :: How to efficiently find a target element in a sorted matrix of distinct ints, in Java? 
Java :: access each key and value in a hashmap java 
Java :: java printf leading zeros 
Java :: afficher texte java 
Java :: How to find the Levenshtein distance between two strings of characters, in Java? 
Java :: how to collect objective in java 
Java :: java iterable to list 
Java :: check if table exist sqlite java 
Java :: spring url parameter 
Java :: onclicklistener in android studio 
Java :: get date by timezone java 
Java :: java get first 3 characters of string 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =