i have 2 edit Text in my application, 1 button to add the input numbers in the edit Text and 1 text view to display the result. I would like to put a toast message if my edit te
when user clicks button check:
if (editText1.getText().toString().trim().length() <= 0) { Toast.makeText(MainActivity.this, "It's empty", Toast.LENGTH_SHORT).show(); }
trim it to avoid blank spaces.