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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:53:38+00:00 2026-06-09T21:53:38+00:00

I have 7 edittext boxes in my xml. I’m using the OnFocusChangeListener to read

  • 0

I have 7 edittext boxes in my xml. I’m using the OnFocusChangeListener to read the value from edittext and i’m using that value for my calculation.I want to make my edittext to lose its focus when i click on the done button in the soft keyboard.so that i can get the value in the edittext.

  • 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-09T21:53:40+00:00Added an answer on June 9, 2026 at 9:53 pm

    Call clearFocus method of EditText to lose focus when done button is clicked from soft-keyboard. do it as:

    editText.setOnEditorActionListener(new OnEditorActionListener() {        
        @Override
        public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
            if(actionId==EditorInfo.IME_ACTION_DONE){
                //Clear focus here from edittext
                 editText.clearFocus();
            }
        return false;
        }
    });
    

    and also add android:imeOptions="actionDone" in edittext xml

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

Sidebar

Related Questions

i have 6 edittext boxes i want to make a function for that 6
I have a list_view_row xml file. The list_view_row.xml contains editText boxes, i want to
I have a UI that has 6 EditText boxes. 3 of those EditText boxes
I have an EditText and I want to attach to it a KeyListener that
I have edittext where I want to enter percentage value i.e decimals value, So
I have an EditText that shows time. After user clicks the EditText I want
I have 14 edittext boxes that a user can change at will. When the
I have an activity that has two EditText boxes, one email and one plain
I have 2 edit boxes in my UI. I want to retrieve data from
I have EditText in my XML as <!-- Inside RelativeLayout --> <EditText android:id=@+id/edtEmail android:layout_width=match_parent

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.