Note that there are some explanatory texts on larger screens.

plurals
  1. POToasting password textview
    text
    copied!<p>I am trying to toast a string that is pulling from a password EditText but my result is coming up blank.</p> <p>I am guessing that this is because the edit text is a password type of field and it is encoded somehow but I don't know how else to get around this.</p> <p>Obviously I don't want to toast the password in the live app, this is for testing purposes, but even in my non-toast test, it still is not working.</p> <p>Here is my simple code:</p> <pre><code>public void SubmitRegistration(View view) { // assign text in fields to string values EditText first = (EditText)findViewById(R.id.first); String first2 = first.getText().toString(); EditText last = (EditText)findViewById(R.id.last); String last2 = last.getText().toString(); EditText display = (EditText)findViewById(R.id.display); String display2 = display.getText().toString(); EditText email = (EditText)findViewById(R.id.email); String email2 = email.getText().toString(); EditText password = (EditText)findViewById(R.id.password); String password2 = password.getText().toString(); EditText vpassword = (EditText)findViewById(R.id.vpassword); String vpassword2 = vpassword.getText().toString(); Toast.makeText(getApplicationContext(), "password 1 = " + password2, Toast.LENGTH_SHORT).show(); // if passwords match, send php url if(vpassword2 == password2) { new RequestTask().execute("http://test"); } else { Toast.makeText(getApplicationContext(), "Passwords do not match!", Toast.LENGTH_SHORT).show(); } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload