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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:44:33+00:00 2026-05-22T14:44:33+00:00

My first (old) Android app ( Suspension Calculator ) is showing a problem I

  • 0

My first (old) Android app (Suspension Calculator) is showing a problem I cannot find a solution for: the spinner control on some spinners is showing transparent lines in unwanted places. The pattern is this: every other spinner is having this problem, starting with the first spinner control. So while spinners 2, 4, 6, … have no unwanted lines, spinners 1, 3, 5, … have them.

The following image (link below) shows the spinner in selected state first, and in unselected state after the red separator. In selected state, the transparent line is at baseline height for the entire control except some places where the button text can be. It’s a little different in unselected state.

I cannot provide an image directly:

[…] as a spam prevention mechanism, new
users aren’t allowed to post images.

But I can give you a link:

Screenshot that illustrated the graphical spinner problem

The XML file under res/layout looks like this:

<ScrollView ...>
    <TableLayout ...>
        <TableRow>
            <TextView
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="@string/units"
                android:gravity="center_vertical"
                android:paddingRight="5dp"
            />
            <Spinner
                android:id="@+id/unit_spinner"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:drawSelectorOnTop="true"
            />
        </TableRow>
        ...
    </TableLayout>
</ScrollView>

I see this problem at least since Froyo (Android 2.2). In earlier versions (at least Android 1.6), it wasn’t there. It’s not there in the Graphical Layout editor in Eclipse, but I see it running the application on the phone and in the emulator – that’s at least consistent and hints to a problem I’m causing by not doing things right ;-).

  • 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-22T14:44:34+00:00Added an answer on May 22, 2026 at 2:44 pm

    Actually I can reproduce this behavior on Android 2.3. Not possible on Android 2.2 and lower.

    It’ doesn’t matter if you place the Spinner in a TableLayout or RelativeLayout. Same problem there..

    Only solution to get ride of the lines was to put a 1px-View between the spinner:

    <Spinner android:layout_height="wrap_content" android:id="@+id/spinnerDriver"
        android:layout_width="match_parent" android:layout_below="@id/driverDesc" />
    
    <View android:id="@+id/helper" android:layout_height="1px"
        android:layout_width="match_parent" android:layout_below="@id/spinnerDriver" />
    
    <Spinner android:layout_height="wrap_content" android:id="@+id/spinnerDriver1"
        android:layout_width="match_parent" android:layout_below="@id/helper" />
    

    This is actually a very, very, very… ugly solution but it works for me…

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

Sidebar

Related Questions

I'm having a troubling problem testing some code for and Android app. My app
I'm going to distribute my app on the Android Market. This app creates some
I'm building my first Android app and its nearly ready for release. One thing
I am not very old in android development, for the first time I am
From my old Access days, there was a First() function that allowed you to
I wish to know how Old Linux scheduling algorithm SJF (shortest job first) calculates
I'm looking for a nice Stack Overflow-style answer to the first question in the old
I'm looking to implement my first Android database, but I have so many questions
I am running into a problem with bitmaps on an Android application I am
I fixed a bug in my Android app, and uploaded the new APK to

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.