title: How to stop the app crashing when String is empty
body: <p>The app crash when there is no text ! 
  I don't have what 'if' to put to fix that !
  Thanks you</p>
  
  <pre><code>enter  TextView TotalTextView;
  EditText EnterPercentage;
  EditText EnterPrice;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
  
      TotalTextView = (TextView) findViewById(R.id.TotalTextView);
      EnterPercentage = (EditText) findViewById(R.id.EnterPercentage);
      EnterPrice = (EditText) findViewById(R.id.EnterPrice);
      Button CalcBtn = (Button) findViewById(R.id.CalcBtn);
  
  
      CalcBtn.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
  
                  float percentage = Float.parseFloat(EnterPercentage.getText().toString());
                  float prix = Float.parseFloat(EnterPrice.getText().toString());
                  float dec = percentage / 100;
                  float total = prix - dec * Float.parseFloat(EnterPrice.getText().toString());
  
                  TotalTextView.setText(String.format("%.2f", total));
  
  
          }
      });
  </code></pre>
  
  <p>Thank for your answer, I am a begineer so... Thanks !</p>
  
  <pre><code>if (EnterPercentage.getText().equals("")) {
  
                  float percentage = Float.parseFloat(EnterPercentage.getText().toString());
                  float prix = Float.parseFloat(EnterPrice.getText().toString());
                  float dec = percentage / 100;
                  float total = prix - dec * Float.parseFloat(EnterPrice.getText().toString());
                  TotalTextView.setText(String.format("%.2f", total));
  
  
              } else {
  </code></pre>
  
  <p>}</p>
  
  <p>the button don't do anything but the app doesn't crash</p>