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 8100641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:47:06+00:00 2026-06-05T22:47:06+00:00

In my code, I have two text boxes that validate input as the user

  • 0

In my code, I have two text boxes that validate input as the user types, and they either display a red cross or a green tick to the right of the box depending on whether the current input is valid or not. I had the red cross image stored in my drawable folder.

Everything was working fine until I decided to get rid of my splash screen. I deleted the class and XML layout file and changed the default activity to ‘Login’, the one with the tick/cross validation.

Now instead of showing a cross when there is incorrect input, a red square is shown. There are no error messages saying that the image can’t be found, but I couldn’t see it in the drawable folder, so I copied the image across again with the same name. I can now see the image in the folder after refreshing the project, but still the same thing happens.

I’ve tried restarting eclipse to no avail. Any ideas?

The android manifest file:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.crowded.media"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:targetSdkVersion="8" 
              android:minSdkVersion="8"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />


    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <activity
            android:name=".Login"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name="RegisteredUser"></activity>
        <activity android:name="OnePennyChallenge"></activity>
        <activity android:name="GamesScreen"></activity>
        <activity android:name="SafeCracker"></activity>

    </application>

</manifest>

The code where I change the image:

    // Add key listener to email edittext and validate as user enters data
    email.addTextChangedListener(new TextWatcher() {

        @Override
        public void afterTextChanged(Editable s) {
            String enteredEmail = email.getText().toString();

            if (validateEmail(enteredEmail) == true) {
                image1.setImageResource(R.drawable.greentick);
            }

            else {
                image1.setImageResource(R.drawable.redcross);
            }
        }

Screen shot showing the res/drawable folder:

enter image description here

And the mysterious red box image:

enter image description here

  • 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-06-05T22:47:08+00:00Added an answer on June 5, 2026 at 10:47 pm

    I had a problem like this.You can solve it:
    1-Change an Id of a view or layout in one layout that is in your res folder.(for example from “@+id/textView” to “@+id/textView1”).
    2-Do save all(Ctrl + Shift + s).
    3-Change that Id to it’s previous value(from “@+id/textView1” to “@+id/textView”).
    4-Do save all(Ctrl + Shift + s) again.
    This must solve your problem.
    It may be a bug in eclipse ADT and I heard that it has been resolved in ADT 10.

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

Sidebar

Related Questions

I have two text input boxes that will need to be populated from the
I have the following code to validate two text box entries to make sure
JSfiddle (showing the non-working code) here: http://jsfiddle.net/ts2Rr/ I have three boxes that a user
I have a report that takes two parameters from a couple of text boxes
I have two string variables which are both file paths. The code that worked
Overview: I have two text boxes at the top of this form for inputting
I Have a function that references a specific input text box. I would like
This is my code. So when button is clicked, I have two edit text
I have a program in which the user inputs information into two separate text
I have a list that the user can filter in several ways. two of

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.