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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:27:22+00:00 2026-06-05T14:27:22+00:00

i have a edittext for filtering list. And my problem is that when i

  • 0

i have a edittext for filtering list. And my problem is that when i click on edittext the keyboard doesn’t show up and when i press enter it just wont close.

I’m filtering using this code:

adapt = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1,veik);
    lv.setTextFilterEnabled(true);
ed.addTextChangedListener(new TextWatcher() {

            @Override
            public void onTextChanged(CharSequence s, int start, int before, int count) {
                // TODO Auto-generated method stub

            }

            @Override
            public void beforeTextChanged(CharSequence s, int start, int count,
                    int after) {
                // TODO Auto-generated method stub

            }

            @Override
            public void afterTextChanged(Editable s) {
                // TODO Auto-generated method stub
                // veikali.this.veik.getFilter().filter(s);
                 adapt.getFilter().filter(s);
            }
        });

          ed.setClickable(true);

Can you please tell me how can i show keyboard when i click on edittext and hide it when i press enter?

  • 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-05T14:27:25+00:00Added an answer on June 5, 2026 at 2:27 pm

    If you are using a TouchScreen phone, on touching the edittext the SoftKeyboard would come up. As for the second part of your query try the following:

    ed.setOnKeyListener(new View.OnKeyListener()
        {
    
            @Override
            public boolean onKey(View editView, int keyCode, KeyEvent event)
            {
                Context mContext = MyClass.this;
                if( keyCode == KeyEvent.KEYCODE_ENTER ){
                    InputMethodManager imm = (InputMethodManager) mContext.getSystemService(Context.INPUT_METHOD_SERVICE);
                    imm.hideSoftInputFromWindow(ed.getWindowToken(),0);
                    return true;
                }
                return false;
            }
        })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to have an EditText that allows multilines and doesn't show the
I have list of products which have EditText in TableLayout . I want Keyboard
I have an EditText box and when you click it the soft keyboard comes
I have an EditText in my Activity that users must enter date in it
I have an EditText in Android. Want to rotate that 90 degrees.I konw it
I have an EditText. When i click on it, it becomes focusable. I will
I have a EditText that I have set to invisible by default. I would
I have an EditText field for the user to enter their weight in lbs.
I have an edittext and I want any character that I type in edittext
I have two EditText views whose height I wish to align. The problem is

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.