android app force closing due to empty EditText
<p>i have searched all over the place and havent been able to find the answer.
here is the code :</p>

<pre><code>package hardy.scl;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.Toast;

public class zody extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        final Button b = (Button)this.findViewById(R.id.Button01);
       final ImageView iv=(ImageView)this.findViewById(R.id.ImageView01);
        final EditText et = (EditText)this.findViewById(R.id.EditText01);
        final EditText et2 = (EditText)this.findViewById(R.id.EditText02);

        b.setOnClickListener(new OnClickListener() { 

            public void onClick(View v) {


int dd = Integer.parseInt(et.getText().toString());

int mm = Integer.parseInt(et2.getText().toString());


          if (dd&gt;=21&amp;&amp;mm==1||dd&lt;=19&amp;&amp;mm==2){    
                iv.setImageResource(R.drawable.aq);

          }
            else if (dd&gt;=20&amp;&amp;mm==2||dd&lt;=20&amp;&amp;mm==3) {
                iv.setImageResource(R.drawable.pi);

            }

            else if (dd&gt;=21&amp;&amp;mm==3||dd&lt;=20&amp;&amp;mm==4) {
                iv.setImageResource(R.drawable.aries);

            }

            else if (dd&gt;=21&amp;&amp;mm==4||dd&lt;=21&amp;&amp;mm==5) {
                iv.setImageResource(R.drawable.tau);

            }


            else if (dd&gt;=22&amp;&amp;mm==5||dd&lt;=21&amp;&amp;mm==6) {
                iv.setImageResource(R.drawable.gem);

            }


            else if (dd&gt;=22&amp;&amp;mm==6||dd&lt;=22&amp;&amp;mm==7) {
                iv.setImageResource(R.drawable.can);

            }


            else if (dd&gt;=23&amp;&amp;mm==7||dd&lt;=21&amp;&amp;mm==8) {
               iv.setImageResource(R.drawable.leo);



            }


            else if (dd&gt;=22&amp;&amp;mm==8||dd&lt;=23&amp;&amp;mm==9) {
                iv.setImageResource(R.drawable.virg);

            }

            else if (dd&gt;=24&amp;&amp;mm==9||dd&lt;=23&amp;&amp;mm==10) {
                iv.setImageResource(R.drawable.lib);

            }

            else if (dd&gt;=24&amp;&amp;mm==10||dd&lt;=22&amp;&amp;mm==11) {
                iv.setImageResource(R.drawable.sco);

            }

            else if (dd&gt;=23&amp;&amp;mm==11||dd&lt;=22&amp;&amp;mm==12) {
                iv.setImageResource(R.drawable.sag);

            }

            else if (dd&gt;=23&amp;&amp;mm==12||dd&lt;=20&amp;&amp;mm==1) {
                iv.setImageResource(R.drawable.cap);

            }
            if ((et.getText().length()&lt;1)|| (et2.getText().length()&lt;1)|| (et.getText().length()&lt;1)&amp;&amp; (et2.getText().length()&lt;1)){

                Toast.makeText(getApplicationContext(), "Oh! invisible D.O.B..nice!", Toast.LENGTH_LONG).show();}

            else{

                Toast.makeText(getApplicationContext(), "ERRrr! Wrong D.O.B :/", Toast.LENGTH_LONG).show(); }

            }});}}
</code></pre>

<p>what is it that im doin wrong that is causing the app to force close whenever i click the button if both or any of the edittexts are empty?</p>
