an android app code
<p>string comparison not working.it is going to the next activity even if password does not match neeed help.Code is pasted below</p>

<pre><code>if(m.equals(w)) {
    Toast.makeText(getApplication(), "done", Toast.LENGTH_SHORT).show();
    Intent intent = new Intent();
    intent.setClass(v.getContext(),Mysubactivity.class);
    startActivity(intent);
}
</code></pre>

<p>I have declared m and w as two strings and assigned them to edittext using <code>String m = et.getText.toString();</code></p>
