title: Handling empty EditText with toast
body: <p>So this is the code i got so far: </p>
  
  <pre><code>Button calculate = (Button)findViewById(R.id.calculate);
      calculate.setOnClickListener(new View.OnClickListener() {
  
          @Override
          public void onClick(View v) {
              EditText sun = (EditText)findViewById(R.id.sun1);
              EditText mon = (EditText)findViewById(R.id.mon1);
              EditText tue = (EditText)findViewById(R.id.tue1);
              EditText wed = (EditText)findViewById(R.id.wed1);
              EditText thu = (EditText)findViewById(R.id.thu1);
              EditText fri = (EditText)findViewById(R.id.fri1);
              EditText sat = (EditText)findViewById(R.id.sat1);
              EditText wage = (EditText)findViewById(R.id.wage);
  
              double sun1 = Double.parseDouble(sun.getText().toString());
              double mon1 = Double.parseDouble(mon.getText().toString());
              double tue1 = Double.parseDouble(tue.getText().toString());
              double wed1 = Double.parseDouble(wed.getText().toString());
              double thu1 = Double.parseDouble(thu.getText().toString());
              double fri1 = Double.parseDouble(fri.getText().toString());
              double sat1 = Double.parseDouble(sat.getText().toString());
              double wage1 = Double.parseDouble(wage.getText().toString());
              TextView hours = (TextView)findViewById(R.id.hours);
              TextView income = (TextView)findViewById(R.id.Income);  
              if(wage.getText().length()==0){
                  Toast.makeText(getContext(), "Enter the wage", Toast.LENGTH_SHORT).show();
              }
              else{
              Calculator calc = new Calculator(sun1,mon1,tue1,wed1,thu1,fri1,sat1,wage1);
              hours.setText(calc.hours()+"");
              income.setText(calc.calc()+"");
              }
  </code></pre>
  
  <p>As you can see, I want to display a toast whenever the user leaves any field empty. In this case, I have used only wage object to show where I am failing. I have also tried wage.getText().toString().equals("") and still my app crashes. Maybe it is the toast class that i am getting wrong. Using (this) instead of getContext() in the maketoast doesn't help either. Any suggestions? </p>