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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:00:49+00:00 2026-05-27T19:00:49+00:00

I have a custom spinner layout with an image and a text view but

  • 0

I have a custom spinner layout with an image and a text view but I noticed that depending on the manufacturers skin you cant see the text because of the color ie. white on white, black on black.

I also noticed that none of my other non-custom spinners do this and seems to change automatically so my question is how can I get the text color to change so that it can be read?

this is a non-custom spinner

ArrayAdapter<CharSequence> cAdapter;
    cAdapter = ArrayAdapter.createFromResource(this, R.array.colors,android.R.layout.simple_spinner_item);
    int cSpinnerDD = android.R.layout.simple_spinner_dropdown_item;
    cAdapter.setDropDownViewResource(cSpinnerDD);
    color.setAdapter(cAdapter);

the custom spinner I just override the view to put the images in with text

here is the layout for it

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView android:id="@+id/icon"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"/>
<TextView android:id="@+id/icon_txt"
    android:paddingLeft="25dp"
    android:textSize="18sp"
    android:layout_marginTop="5dp"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"/>  
</LinearLayout>
  • 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-27T19:00:50+00:00Added an answer on May 27, 2026 at 7:00 pm

    Use the default text color of the current theme (stored in the resource ID android.R.attr.textColorPrimary) :

    <TextView android:id="@+id/icon_txt"
        android:textColor="?android:attr/textColorPrimary"
        ... />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom spinner that uses two custom views, one for the drop
I have a custom spinner dropdown xml file in /res/layout/: spinner_view_dropdown.xml: <?xml version=1.0 encoding=UTF-8?>
I want to implement the below: A spinner which would have a custom layout,
I have a custom 9-patch image for my spinner. This image works fine on
I have custom gallery. Gallery represents items that are frame layout. There are one
I have custom component that I can place in my layout file (XML) for
I have custom errors configured in my web.config, but IIS 6.0 is returning the
I have custom classes that I currently instantiate within App.xaml as resources. I want
I have a few models that need to have custom find conditions placed on
I have a custom spinner (customized for formatting). It works fine and shows the

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.