title: How to set default value to 0 in edittext when nothing is inputted?
body: <p>I have an app here which adds the number. I have 4 edittexts here. What I want to happen is that when i entered none in one of the edittexts, it will assume that I entered 0. How can it be done? Here is my code:</p>
  
  <pre><code>public class Order extends Activity {
  Button GoBackHome;
  private Button button1;  
  private EditText txtbox1,txtbox2,txtbox3,txtbox4;  
  private TextView tv;
  Button PayNow;
  
  @Override
  public void onBackPressed() {
  }
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
          setContentView(R.layout.order);
  
          GoBackHome = (Button) findViewById(R.id.gohomebutton);
          PayNow = (Button) findViewById(R.id.button2);
          txtbox1= (EditText) findViewById(R.id.editText1);  
          button1 = (Button) findViewById(R.id.button1);  
          tv = (TextView) findViewById(R.id.editText5);  
          txtbox2= (EditText) findViewById(R.id.editText2);
          txtbox3= (EditText) findViewById(R.id.editText3);
          txtbox4= (EditText) findViewById(R.id.editText4);
          button1.setOnClickListener(new clicker());  
  
          GoBackHome.setOnClickListener(new OnClickListener() {
              @Override
              public void onClick(View v) {
                  final Intent i = new Intent(Order.this, MainActivity.class);               
                  startActivity(i);
              }
          });
  
          PayNow.setOnClickListener(new OnClickListener() {
              @Override
              public void onClick(View v) {
                  final Intent i = new Intent(Order.this, Payment.class);               
                  startActivity(i);
              }
          });
  
  
  }
  
  
  class clicker implements Button.OnClickListener  
  {  
      public void onClick(View v)  
      {  
          String a,b,c,d;  
          Integer vis;  
          a = txtbox1.getText().toString();  
          b = txtbox2.getText().toString();
          c = txtbox3.getText().toString();
          d = txtbox4.getText().toString();
          vis = Integer.parseInt(a)*2+Integer.parseInt(b)*3+Integer.parseInt(c)*4+Integer.parseInt(d)*5;  
          tv.setText(vis.toString());  
      }  
  }  
  
  }
  </code></pre>