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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:24:33+00:00 2026-06-13T17:24:33+00:00

I’m trying to create a theme for my first Android app, and it is

  • 0

I’m trying to create a theme for my first Android app, and it is driving me round the bend. I finally managed to figure out how to style items in a dropdown list, but now I can’t change the colour of the divider between list items. I have searched similar questions on stackoverflow, and tried dozens of combinations, but nothing seems to work.

Here is my styles.xml file (abbreviated for clarity):

<?xml version="1.0" encoding="utf-8"?>
<resources>
  <style name="MyTheme" parent="android:Theme.Light">
    <item name="android:spinnerStyle">@style/spinnerStyle</item>
    <item name="android:spinnerDropDownItemStyle">@style/spinnerDropDownItemStyle</item>    
    <item name="android:dropDownListViewStyle">@style/spinnerListViewStyle</item>
  </style>

  <style name="spinnerStyle" parent="@android:style/Widget.Spinner">
      <item name="android:background">@drawable/my_theme_spinner</item>
  </style>

  <style name="spinnerDropDownItemStyle" parent="@android:style/Widget.DropDownItem.Spinner">
      <item name="android:background">@drawable/my_theme_spinner_item</item>
      <item name="android:paddingLeft">5dp</item>
      <item name="android:gravity">center_vertical</item>
  </style>

  <style name="spinnerListViewStyle" parent="@android:style/Widget.ListView.DropDown">
      <item name="android:height">3dp</item>
      <item name="android:dividerHeight">3dp</item>
      <item name="android:divider">@color/divider</item>
  </style>
</resources>

No matter what I do, I just get a 1dp light grey divider between items (which can barely be seen with my light coloured list item background) – neither the height nor colour of the divider is ever affected (I also tried setting it to a drawable, also with no effect). What am I doing wrong?

  • 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-13T17:24:34+00:00Added an answer on June 13, 2026 at 5:24 pm

    I have a very simple Activity with the Spinner and it works for the following. The only difference I see is that you have a <item name="android:height">3dp</item> and I don’t have that at all.

    <style name="TestSpinnerStyle" parent="android:style/Widget.ListView.DropDown">
        <item name="android:divider">#ff0000</item>
        <item name="android:dividerHeight">5dp</item>
    </style>
    
    
    <style name="SampleTheme" parent="@android:style/Theme.Holo.Light">
        <item name="android:dropDownListViewStyle">@style/TestSpinnerStyle</item>
    </style>
    

    and in my Activity I have:

        Spinner spinner = (Spinner) findViewById(R.id.spinner);
        List<String> list = new ArrayList<String>();
        list.add("list 1");
        list.add("list 2");
        list.add("list 3");
        ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this,
                android.R.layout.simple_spinner_item, list);
        dataAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);
        spinner.setAdapter(dataAdapter);
    

    and then for the main layout I have the following XML:

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                  android:orientation="vertical"
                  android:layout_width="fill_parent"
                  android:layout_height="fill_parent"
            >
        <TextView
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="Hello World, StylingActivity"
                />
        <Spinner android:id="@+id/spinner"
                 android:layout_width="250dp"
                 android:layout_height="40dp"
                 />
    </LinearLayout>
    

    Here is the screenshot

    sample activity screnshot

    If you can’t get it to work from there, I can push up the entire thing to a github repo for you.

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

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Basically, what I'm trying to create is a page of div tags, each has
We're building an app, our first using Rails 3, and we're having to build
I'm trying to create an if statement in PHP that prevents a single post
I am trying to understand how to use SyndicationItem to display feed which is
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

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.