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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:36:50+00:00 2026-05-27T22:36:50+00:00

If I press any alphabet/number when application gets launched, EditText gets activated automatically and

  • 0

If I press any alphabet/number when application gets launched, EditText gets activated automatically and starts searching for the corresponding string.

For eg., On app launch, if user presses alphabet ‘A’ by mistake, EditText fetched that and shows all results starting from ‘A’.

Actually it should be activated and should display corresponding result if and only if a user clicks on EditText, and not otherwise.

I tried this in main.xml

    android:focusable="false"
    android:clickable="true"

and in activity class

@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);      
            lsym = (ListView) findViewById(R.id.lsym);
        edsearch = (EditText) findViewById(R.id.edsearch);

            dbM = new DbManager(this);
            symbolarr = dbM.getSymbol();
            edsearch.setOnClickListener(new Button.OnClickListener() {
                @Override
                public void onClick(View v) {

                     edsearch.setFocusable(true);
                    edsearch.requestFocus();
                }
            });

            edsearch.addTextChangedListener(new TextWatcher() {

                @Override
                public void onTextChanged(CharSequence s, int start,
                        int before, int count) {

                    //FILTERING LIST
                }
            });
}

, but it takes the focus away from EditText permanently and doesn’t get focus again even if it is clicked.

What am I doing wrong?

ANY HELP WILL BE LIFE-SAVER !!!

  • 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-27T22:36:51+00:00Added an answer on May 27, 2026 at 10:36 pm

    You should use below attributes for parent layout

    android:focusable="true"
    android:focusableInTouchMode="true"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When creating an console application (blank document) how can I get the Press Any
void GasPump::dispense() { bool cont = true; char stop; do{ cout << Press any
When I press F5 in Visual Studio 2008, I want Google Chrome launched as
when I press the Maximize button on my WPF app, all the controls therein
When I press F5, everything compiles fine, but when the app is to be
I want to detect voice of any buddy(Note: i am not going to press
Live Example Here Press any of buttons. Can you see shaky slideDown effect? In
I want to be able to do something along the lines of Press any
Here is a simple code in C++: cout << Press Any Key To Exit...;
When the program is over, I want it to say Press any key to

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.