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

  • Home
  • SEARCH
  • 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 9217009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:32:39+00:00 2026-06-18T02:32:39+00:00

I currently have an autocomplete dropdown box on my app, but it appears the

  • 0

I currently have an autocomplete dropdown box on my app, but it appears the font color is a sort of grey and not visible when the list is being populated. The second picture shows how the dropdown looks when clicked. How can I change the layout for the dropdown to show the items in the list as a different colour like black?

Pics below !

First

Second

EDIT

    AlertDialog.Builder adb = new AlertDialog.Builder(SettingsMain.this);
                LayoutInflater inflater =     SettingsMain.this.getLayoutInflater(); 
                final View searchlayout = inflater.inflate(R.layout.search_friend, null);
               
                friend_name = (AutoCompleteTextView) searchlayout.findViewById(R.id.friend_name);       
                friend_name.addTextChangedListener(new TextWatcher() {
                    public void afterTextChanged(Editable editable) {

                    }

                    public void beforeTextChanged(CharSequence charSequence, int arg1, int arg2, int arg3) {

                    }

                    public void onTextChanged(CharSequence charSequence, int start, int before, int count) {
                        String text = charSequence.toString();
                            
                            new MyAsyncTask("get").execute("http://10.0.2.2/jamtivia/webservice.php?type=get_friends&username="+text);
                            drop_down_adapter = new ArrayAdapter<String>(getApplicationContext(), android.R.layout.simple_dropdown_item_1line,adapterList);
                            drop_down_adapter.notifyDataSetChanged();
                            friend_name.setAdapter(drop_down_adapter);
                            if (!friend_name.isPopupShowing()) {
                                friend_name.showDropDown();
                            } 
                            
                            
                                for(int i =0;i < adapterList.size();i++)
                                    Log.d("TEXT CHNGE", adapterList.get(i));
                    }
                });
        
                adb.setView(searchlayout)
               
               .setPositiveButton("Ok", new DialogInterface.OnClickListener() {  
                    public void onClick(DialogInterface dialog, int whichButton) {  
                        String fname = friend_name.getText().toString();
                        Integer friend_id = null;
                        
                        try{
                            friend_id = adapterListId.get(adapterList.indexOf(fname));
                            Log.d( "ECHO" , "text : " + name +"ID :"+ player_id+ " ID: " + friend_id);
                            String request = "http://10.0.2.2/jamtivia/webservice.php?type=add_friends&friendId="+friend_id+"&playerId="+player_id;
                            new MyAsyncTask("send").execute(request);
                        }catch(Exception e){Log.d( "PROBLEM SENDING" , "text : " + adapterList.indexOf(fname));}
                        return;                  
                       }  
                  })
               .setNegativeButton("Done", new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialog, int id) {

                        dialog.cancel(); 
                    }
                }); 
    
                    adb.show();  

Also, as far as you can see with this snippet of code, is this a good way to carry out this function?

  • 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-18T02:32:40+00:00Added an answer on June 18, 2026 at 2:32 am

    While creating ArrayAdapter instead using the predefined layout use your custom layout

    like this

    <?xml version="1.0" encoding="utf-8"?>
    <TextView xmlns:android="http://schemas.android.com/apk/res/android" 
     android:id="@+id/cust_view"  
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" 
        android:textColor="@android:color/white"
        android:background="@drawable/list_style" 
        android:textSize="17sp"
        android:padding="5dp"
        android:gravity="left|center_vertical"/> 
    

    //you can give color or image of your choice as background
    and give a name as your choice let us say custom_list.xml

    While Creating adapter use your layout like this

     drop_down_adapter = new ArrayAdapter<String>(getApplicationContext(), R.layout.custom_list,adapterList);
    

    I hope this will help you

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

Sidebar

Related Questions

I currently have a deployed app (fortworth.herokuapp.com) that I am attempting to sort movies
I currently have a query string for the jQuery Autocomplete plug in but should
Currently, I have this version of the autocomplete control working when returning XML from
Problem Description: I have a simple dialog with a dropdown list and a textbox.
I have the following code to parse the country when the autocomplete list is
I currently have a f.collection_select in my rails app. What is the best way
I have an autocomplete widget that displays text w/ images. Currently my results look
I have a simple wikipedia autocomplete using the wikipedia's API. Currently it is working
I have a jQuery text box autocomplete script which uses a PHP script to
I installed the JQuery token-input plugin. https://github.com/loopj/jquery-tokeninput Autocomplete is working, but I have a

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.