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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:39:22+00:00 2026-06-03T01:39:22+00:00

I’m writting an Android app. I have several spinners. Each one shows an extra

  • 0

I’m writting an Android app. I have several spinners. Each one shows an extra line near the bottom and on the left and right sides of the spinner. Please see the image. Does anyone know why this is happening and how to fix it?

enter image description here

Here’s the entry in the xml file that defines the spinner:

    <Spinner android:id="@+id/formatSpinner"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:drawSelectorOnTop="true"
         android:prompt="@string/format_prompt"/>

And here is the code that initializes it:

        cur = mDbHelper.fetchAllFormats();
        adapter = new SimpleCursorAdapter(this, android.R.layout.simple_spinner_item, cur,
                new String[]{MoviesDbAdapter.KEY_NAME}, new int[]{android.R.id.text1});
        adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        formatSpinner.setAdapter(adapter);

Thanks!

Update1: I did some experimenting, and if the TextView that precedes the spinner is removed from the XML file, the spinner displays properly. I have no idea why this would be, any ideas?

Update2: Also, if I add a layout_marginTop to the spinner, the problem goes away! This is really weird.

  • 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-03T01:39:23+00:00Added an answer on June 3, 2026 at 1:39 am

    This is clearly a bug with android. I have seen others run into the same issue, and no one has a good answer. This is actually not a line being drawn on the spinner control, as I had originally thought, but a “gap” in the drawing of the control that allows the background color to show through.

    The fix, or work around for this is to change the position of where the spinner is drawn. I did this by adding an odd numbered margin before the first spinner. In my case, I used 5dp. I then used 4dp for the following two spinners so that they all begin on an odd pixel number.

    This is kind of ugly, but until a fix is created for this, it is the best solution I’ve found.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,
I am reading a book about Javascript and jQuery and using one of the
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
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.