Android, using Edittext
<p>I've got a few questions about edittext.. </p>

<p>I'm trying to create a login screen on Android. I'm taking in a username and a password and then sending the results to another method. I've just got a few questions about it...</p>

<p>1) If I have two edittext's and the user enters values in both and then hits a "login" button, I want the button to take the values that were entered in the 2 edittext boxes, convert and save them to a string and then pass them to a function. I'm unsure how I'd construct this button. The problem I'm having is making it a string I'm currently doing this.. </p>

<pre><code>String user = edittext.getText();
</code></pre>

<p>But that doesn't seem to work. Also I'm unsure what way Android saves Edittext inputs.. Will it just automatically save it to the string once the user is no longer working out of the box? e.g will...</p>

<pre><code> public boolean onKey(View v, int keyCode, KeyEvent event) {
            String user = edittext.getText();

        } 
</code></pre>

<p>work? If not how would I define it?</p>

<p>Thanks.</p>
