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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T03:55:07+00:00 2026-06-17T03:55:07+00:00

I have a basic AutoCompleteTextView and an ArrayAdapter bound to it. Works great on

  • 0

I have a basic AutoCompleteTextView and an ArrayAdapter bound to it. Works great on Android 4.*, but on 2.3 whenever I scroll the dropdown the rows render in all black. If I tap on a row then the entire dropdown renders correctly.

In the below text, when the TextView is generated using inflate, if I set the background color to white (the commented out line) then it always shows white even when scrolling, but the tap selection effect (changing the row to the system tap a row color) doesn’t work then.

I am using actionbarsherlock here but I would hope that wouldn’t the the cause here. Any ideas?

Screenshot: https://i.stack.imgur.com/GfJ32.png

public class AutocompleteAdapter extends ArrayAdapter<String> implements Filterable {

public AutocompleteAdapter(Context context) {
    super(context, android.R.layout.simple_dropdown_item_1line);

    mInflater = LayoutInflater.from(context);
    mContext = context;
}

@Override
public View getView(final int position, final View convertView, final ViewGroup parent) {
    final TextView tv;
    if (convertView != null) {
        tv = (TextView) convertView;
    } else {
        tv = (TextView) mInflater.inflate(android.R.layout.simple_dropdown_item_1line, parent, false);
        //tv.setBackgroundColor(tv.getResources().getColor(R.color.white));
    }

    tv.setText(getItem(position));
    return tv;
}
....
  • 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-17T03:55:08+00:00Added an answer on June 17, 2026 at 3:55 am

    Its because your theme is dark..

    If your theme in Manifest.xml is light.. ie,

        <application
            android:label="@string/app_name"
            android:theme="@style/Theme.Light.NoTitleBar.Workaround" >
    

    I’ve get it to work by adding 2 xml files in values folder..

    styles.xml

    <resources>
    
        <style name="AppTheme" parent="android:Theme.Light" />
          <style name="AutoCompleteTextViewLight" parent="@android:style/Widget.AutoCompleteTextView">
        <item name="android:textColor">@android:color/primary_text_light</item>
        </style>
        <style name="Widget.DropDownItemLight" parent="@android:style/Widget.DropDownItem">
            <item name="android:textColor">@android:color/primary_text_light</item>
        </style>
    </resources>
    

    theme.xml

    <resources>
        <style name="Theme.Light.NoTitleBar.Workaround" parent="@android:style/Theme.Light.NoTitleBar">
            <item name="android:autoCompleteTextViewStyle">@style/AutoCompleteTextViewLight</item>
            <item name="android:dropDownItemStyle">@style/Widget.DropDownItemLight</item>
        </style>
    </resources>
    

    I couldnt find another way…

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

Sidebar

Related Questions

Currently, i have basic C++ and PHP skills. But, i want to switch to
So I am really stumped because I have basic ideas but I am looking
I have basic configuration for Spring SEcurity. The logout button works perfectly fine over
I have basic client-side validation working in my MVC3 RC2 application, but I'm now
I am new to Qt Programming, but I have basic on C++. I want
Possible Duplicate: How to remove the text in progressBar in Android? I have basic
I have basic knowledge about SQL. But I still have difficulty when write SQL
I have basic knowledge of the .net platform and c# language, but i want
I have been working on android from 6 months. So I have basic idea
I have basic idea in mind, A ball is bouncing and after all bounces

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.