Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7514223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T00:25:59+00:00 2026-05-30T00:25:59+00:00

I hope this hasn’t been asked yet, since I couldn’t find it. I am

  • 0

I hope this hasn’t been asked yet, since I couldn’t find it. I am attempting to get a user’s username and password for an online service. I created a username TextView and a password TextView. I’m able to get text out of the username TextView without problems. However, I can’t get anything from the password TextView. Below is the XML:

<TextView
    android:id="@+id/user_password"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center_horizontal"
    android:layout_marginTop="8dp"
    android:text="@string/passcodeQuery"
    android:textAppearance="?android:attr/textAppearanceLarge" />

<EditText
    android:id="@+id/editText2"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_marginLeft="8dp"
    android:layout_marginRight="8dp"
    android:layout_marginTop="8dp"
    android:hint="@string/passwordHint"
    android:inputType="textPassword" />

The problem is, if I run the code

TextView passField = (TextView)findViewById(R.id.user_password);

then

String toastMessage = "Password: " + passField.getText().toString();

No matter what I put into the password field, the toast message gives me

Password: Password

I obviously won’t be toasting the users password normally, I am just doing it now because I want to make sure I’m reading the inputs correctly. Unfortunately, that doesn’t seem to be the case, as I can’t read the password field. How do you get around that? Ton’s of apps seem to be able to do it. Is there an easier way to get a password than what I’m doing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T00:26:01+00:00Added an answer on May 30, 2026 at 12:26 am

    If you want to Toast like "PassWord: YOUR EDITTEXT VALUE" then use this.

    EditText passField = (EditText)findViewById(R.id.editText2); 
    

    and then use:

    String toastMessage = "Password: " + passField.getText().toString();
    

    Now toast the message.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I hope this hasn't been asked before. I have a nullable boolean called boolIsAllowed
I hope that this question hasn't been asked already, but I was looking for
Hope this question hasn't been asked before. I've got the following working <!-- 640x920
I hope this question (or one similar) hasn't been asked before. Sincere apologies if
I hope this hasn't been asked and I just missed it, but I searched
I hope this hasn't been asked before but it's hard for me to put
I hope this hasn't been asked before, if so I apologize. EDIT: For clarity,
I hope this hasn't already been answered, but I feel like I have read
hope this wasn't asked already, but I can't find an answer. I got a
i hope this hasn't already been answered, I've looked through for awhile and haven't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.