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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:54:17+00:00 2026-06-17T11:54:17+00:00

No error in logcat, but the suggestion list will not show I am not

  • 0

No error in logcat, but the suggestion list will not show I am not sure where I went wrong. I have the autocomplete view inflated in an alert dialog box. Here is my code below

reg_btn.setOnClickListener(new View.OnClickListener() {

        public void onClick(View v) {


                final String[] devplatforms =
                     {
                     "C",
                     "C++",
                     "Java",
                     "iPhone",
                     "Android",
                     "ASP.NET",
                     "PHP",
                     "Python",
                     };


                AlertDialog.Builder adb = new AlertDialog.Builder(SettingsMain.this);
                LayoutInflater inflater = SettingsMain.this.getLayoutInflater(); 
                final View searchlayout = inflater.inflate(R.layout.search_friend, null);

               adb.setView(searchlayout)

               .setPositiveButton("Ok", new DialogInterface.OnClickListener() {  
                    public void onClick(DialogInterface dialog, int whichButton) {  
                        AutoCompleteTextView friend_name;
                        friend_name = (AutoCompleteTextView) searchlayout.findViewById(R.id.friend_name);
                        friend_name.setThreshold(1);
                        friend_name.setAdapter(new ArrayAdapter<String>(getApplicationContext(),android.R.layout.simple_dropdown_item_1line,devplatforms));

                        String name = friend_name.getText().toString();
                        Log.d( "ECHO" , "Pin Value : " + name);
                        return;                  
                       }  
                  })
               .setNegativeButton("Done", new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialog, int id) {


                        dialog.cancel(); 
                    }
                }); 

                    adb.show();  

    });
  • 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-17T11:54:18+00:00Added an answer on June 17, 2026 at 11:54 am

    It looks like this code is in the wrong place:

    AutoCompleteTextView friend_name;
    friend_name = (AutoCompleteTextView) searchlayout.findViewById(R.id.friend_name);
    friend_name.setThreshold(1);
    friend_name.setAdapter(new ArrayAdapter<String>(getApplicationContext(),android.R.layout.simple_dropdown_item_1line,devplatforms));
    

    Move it above this line:

    adb.setView(searchlayout)
    

    You inflated the layout, but you are only passing the AutoCompleteTextView an Adapter in your “Ok” Button… Set up the AutoCompleteTextView before displaying the Dialog.

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

Sidebar

Related Questions

program not error but logcat error about index array list so picture I can't
I try to drop table programmatically nothing error show in logcat, but there has
I have some error in logcat but i dont know how to identify it.
i am trying to fetch data from SQLite to list view but my list
My application works very fine on emulator without any logcat error, but it abruptly
I m doing ndk with java but got these error in logcat. 11-02 12:36:43.582:
Im not gettin the following error fixed (logcat): E/AndroidRuntime( 1010): FATAL EXCEPTION: Thread-105 E/AndroidRuntime(
I am getting error in DDMS, when I click in logcat error it moves
i got this error in the logcat 06-21 11:58:27.275: E/AndroidRuntime(404): java.lang.RuntimeException: Unable to start
I get this error message in LogCat: 06-25 15:17:34.495: E/AndroidRuntime(5891): java.lang.RuntimeException: Unable to start

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.