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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:28:51+00:00 2026-06-05T00:28:51+00:00

All, I am new to using the PreferenceActivity and ended up getting it to

  • 0

All,

I am new to using the PreferenceActivity and ended up getting it to work. However, the issue I am having is that there is an ugly white space after my preference items. I tried applying a style and setting the background color to black. However, this did not work. Any help would be appreciated. I attached some code and a screenshot below.

Thx

public class EditPref extends PreferenceActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);

    addPreferencesFromResource(R.xml.preferences);

}

}

The style xml code:

  <?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="editPref">
       <item name = "android:background">#FF000000</item>





    </style>

</resources>

attached is the preference xml file.

<PreferenceScreen
    xmlns:android="http://schemas.android.com/apk/res/android">
    <CheckBoxPreference
        android:key="checkbox"
        android:title="Checkbox Preference"
        android:summary="Check it on, check it off" />
    <RingtonePreference
        android:key="ringtone"
        android:title="Ringtone Preference"
        android:showDefault="true"
        android:showSilent="true"

        android:summary="Pick a tone, any tone" />
</PreferenceScreen>

I am developing for API 10.

enter image description here

  • 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-05T00:28:52+00:00Added an answer on June 5, 2026 at 12:28 am

    What does your Activity declaration look like in the ActivityManifest.xml? More specifically, what theme are you using? I posted a solution to a related SO post, but basically you should be able to get rid of the ugly white space by setting overScrollFooter to @null for your ListViews on API Level 10+.

    I was having the same issue and just wrote a blog post with a little more detail, but try using this (substituting the theme you’re using for the parent, of course):

    res/values/styles.xml

    <style name="MyListView" parent="@android:style/Widget.ListView">
    </style>
    

    res/values-v10/styles.xml

    <style name="MyListView" parent="@android:style/Widget.ListView">
        <item name="android:overScrollFooter">@null</item>
    </style>
    

    Set your theme to use the new ListView style:

    <style name="Theme.MyPreferences" parent="android:Theme.Holo">
        <item name="android:listViewStyle">@style/MyListView</item>
    </style>
    

    And in your AndroidManifest.xml, declare the EditPref Activity to use the new theme. Something along the lines of:

    <activity
        android:name=".EditPref"
        android:theme="@style/Theme.MyPreferences" /> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been using ShowDialog() in following way for all my new Windows. SomeGui test
Being resonably new to using GTK+, im not fully aware of all its functionality.
I m new to using Web services using JavaScript. All I want is to
i am using web service asmx, whenever a new request comes, all objects will
I am new in android, I am using jackson-all-1.9.4 jar in my application for
This is probably one of the things that all new users find out about
Is it possible to add all new files using p4 add command. Actually I
I'm new using vs2010 I've read that when you click on a variable its
I´m all new to scraping and I´m trying to understand xpath using R. My
This is all new to me so this is a rather broad open ended

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.