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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T03:04:05+00:00 2026-05-22T03:04:05+00:00

I have a problem that has manifested itself since I tried to add themes

  • 0

I have a problem that has manifested itself since I tried to add themes to my application. At the moment I am just using themes to change the background colour of the screen. The problem is that as well as the background of the screen changing to the theme colour, the background of the text in the spinner control also changes to that colour. When the drop down is displayed the spinner control is replaced by the block background colour.

The themes are defined as follows:

<style name="Theme" parent="android:style/Theme">
</style>

<style name="Theme.Pink">
       <item name="android:background">#ffc0cb</item>
</style>

<style name="Theme.Yellow">
       <item name="android:background">#FFE97E</item>
</style> 

Themes are set in the Activity OnCreate with:

setTheme(R.style.Theme.Yellow);

The Spinner is set up with:

    bowAdapter = new SimpleCursorAdapter(this, R.layout.spinner_style, bowCursor, 
                 new String[] { DBAdapter.KEY_BOW_NAME }, 
                 new int[] { android.R.id.text1 });
    bowAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    bowSelectSpinner.setAdapter(bowAdapter);

spinner_style.xml contains

<?xml version="1.0" encoding="UTF-8"?>
<TextView xmlns:android= "http://schemas.android.com/apk/res/android"
                android:id="@android:id/text1"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:textSize="@dimen/but_txt_size"
        android:textColor="@android:color/white"
        android:gravity="center" 
        android:ellipsize="marquee" />

How can I stop the spinner picking up the background colour specified in the theme?

I have been chasung this for 2 days now so any hints gratefully rec

  • 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-22T03:04:06+00:00Added an answer on May 22, 2026 at 3:04 am

    Check this answer: Changing background color for items of Spinner. No matter what your theme’s background is, you can set your spinner background to override it.

    You can do, from code:

    yourView.setBackgroundColor(int color)
    

    or, from xml

    <Spinner android:id="@+id/spinner"
         ...
         android:background="#YOUR_HEXA_COLOR"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem that has been effectively reduced to a Travelling Salesman Problem
STL containers have the problem that iterators can be invalidated when the container changes.
I have a custom UITableViewCell that has 2 buttons and a label on it.
I have an MVC app that has Controller that takes a IDomainService . The
I have a pre-made Word Template that has a table. I would like to
I have a problem trying to show some images on my winform. On one
Im trying to get values from a ListBox that has multiselection and dynamic ListItems
We tried adding Rampart to our module's POM file and after doing so our
What basically I am doing is the set cover problem, removing duplicate from the
I'm trying to send and receive binary data sms from my app (sdk 2.1-update

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.