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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:12:37+00:00 2026-05-23T10:12:37+00:00

I have an activity that displays a few EditTexts on screen for user input.

  • 0

I have an activity that displays a few EditTexts on screen for user input. To be sure the soft keyboard doesn’t cover my fields when it displays I have set the property

android:windowSoftInputMode="adjustPan"

for my Activity in the manifest. I am validating the EditText’s content when 1. The view loses focus 2. When the user performs the ‘Enter’ action. Upon validation, if the value is not valid I am calling

setError(CharSequence error)

on the EditText, which causes a popup to display containing the error I passed in. The problem is if the EditText is moved up when the soft keyboard displays, and the popup is displayed at that time (validation has failed), the popup doesn’t follow the EditText down when the keyboard goes away, it stays where it was first displayed.

Any ideas on how to fix this? Is this a bug in Android?

  • 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-23T10:12:37+00:00Added an answer on May 23, 2026 at 10:12 am

    If this is as you described, I think this may be a genuine bug, so may be worth writing it up on the Android Source site.

    So evidently I can only think of hack work arounds!

    Override when the keyboard disappears:

    public boolean onKeyPreIme(int keyCode, KeyEvent event) {
     if (keyCode == KeyEvent.KEYCODE_BACK && 
         event.getAction() == KeyEvent.ACTION_UP) {
             revalidateEditText();
             return false;
     }
     return super.dispatchKeyEvent(event);
    }
    
    public void revalidateEditText(){
           // Dismiss your origial error dialog           
           setError(null);
           // figure out which EditText it is, you already have this code
           // call your validator like in the Q
           validate(editText); // or whatever your equivalent is
    }
    

    This will revalidate your EditText, dismiss your error dialog and re-show it.

    How’s that sound?

    Inspired by: Get back key event on EditText

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

Sidebar

Related Questions

I have an activity that contains several user editable items (an EditText field, RatingBar,
I have JavaScript that is doing activity periodically. When the user is not looking
I have an Activity that displays comments. The comments themselves have a layout, so
I have an Android Activity that displays Google Maps through MapView control and extending
I have an Android activity that displays a list of log entries (using a
I have an Activity that retrieves information from a remote server and displays it
I have an Activity in my app that simply displays some results from a
I have a activity that displays a number of elements from a list that
In my application I have a activity that displays contents from internet..... I just
I have an activity that pulls a String Array from xml and displays a

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.