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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:54:50+00:00 2026-05-26T04:54:50+00:00

I have a problem which occurs only when I use AnySoftKeyboard. I’m trying to

  • 0

I have a problem which occurs only when I use AnySoftKeyboard.
I’m trying to show/hide the keyboard according to EditText focus.
I used the methods I found in this post

When I’m hiding the keyboard, there is a strange behavior –

  • When I rotate the screen, the text that was in the EditText is doubled.
  • I thought that it has to do with the onCreate method, but I can see the it happens also when I click “back” (Finish()). I see it for a split second before the Activity is closed.
  • When I start a new activity, (ActivityB from ActivityA) then clicking “Back” once doesn’t do anything (probably “closing” the invisible keyboard).
  • When I click “back” again, ActivityB closes but I can see for a split second the text from ActivityA keyboard in a big font across the screen (like a 100 millisecond pop-up )

Does anyone has an idea how to deal with it?

  • 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-26T04:54:50+00:00Added an answer on May 26, 2026 at 4:54 am

    Apparently it is a bug in AnySoftKeyboard.
    I didn’t happen when I use other keyboards.

    I solved it by doing setText to the EditText view before hiding it – its probably resets some stuff on keyboard object.

    Here is my code:

            View view = getWindow().getCurrentFocus();
            if (view==null)
                return;
    
            IBinder binder = view.getWindowToken();
            if (binder == null)
                return;
    
             // I used this to fix the strange behaviour
            if (view instanceof EditText)
                ((EditText)view).setText(((EditText)view).getText().toString());
    
    
            InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
            imm.hideSoftInputFromWindow(binder, InputMethodManager.HIDE_NOT_ALWAYS);
    

    Surprisingly it works!

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

Sidebar

Related Questions

I have the following intellisense problem, which only occurs in the Release configuration, even
I have a problem which requires me to parse several log files from a
I have a problem which I think is related to forward declarations, but perhaps
I have a problem which requires a reversable 1:1 mapping of keys to values.
I have a problem which I cant seem to find answer to through searches
I have a problem which I don't know how to fix. It has to
I'm developing an Eclipse plug-in and I have a problem which is reproduced here:
I have a strange problem which I can't fix: A field: private boolean[][][] gaps;
I have a very simple problem which requires a very quick and simple solution
It looks like a problem which could have simple solution, but I haven't found

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.