title: Check if Edittext is empty and if it is not then perform a particular piece of task
body: <p>I am making an app and I'm stuck with one problem. I want to know what can I do to make this happen:</p>
  
  <p>I want to check if the edit text is empty or not and if it is not, then perform a particular piece of the task and if it is empty then make a toast which says please enter the names.</p>
  
  <p>Here is my code: `</p>
  
  <pre><code>final TextView percentage = (TextView) findViewById(R.id.percentage_text);
  Button calculateButton = (Button) findViewById(R.id.calculate_button);
  
      calculateButton.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
  
              Random noGen = new Random();
              int number = noGen.nextInt(101);
  
              EditText firestName = (EditText) findViewById(R.id.first_name);
              String firstNameString = firestName.getEditableText().toString();
  
              EditText secName = (EditText) findViewById(R.id.sec_name);
              String secNameString = secName.getEditableText().toString();
              percentage.setText(Integer.toString(number));
  
              Toast.makeText(getApplicationContext(), "The love score between " + firstNameString  +" &amp; " + secNameString + " is "  + number + "%", Toast.LENGTH_SHORT ).show();
          }
      });
  </code></pre>
  
  <p>`</p>
  
  <p>I know I can easily do this with if else statement but I am not able to do it</p>
  
  <p>Thanks in advance!!! </p>