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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:31:34+00:00 2026-05-13T23:31:34+00:00

I have a background color applied to a ListView <style name=CKButtons> <item name=android:windowBackground>@color/window_background</item> </style>

  • 0

I have a background color applied to a ListView

<style name="CKButtons">
    <item name="android:windowBackground">@color/window_background</item>
</style>

but everytime the list is scrolled the background color changes back to the system default (black). When the scrolling stops the color goes back to @color/window_background.

The style is applied in AndroidManifest.xml:

<activity android:name=".event.EventList" 
    android:theme="@style/CKButtons"></activity>

and my ListView looks like this:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   android:orientation="vertical"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent"
   >
<ListView
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:id="@+id/android:list"/>
<TextView
    android:id="@+id/android:empty"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:text="@string/eventlist_no_items"/>
</LinearLayout>

How can I prevent this from happening?

  • 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-13T23:31:35+00:00Added an answer on May 13, 2026 at 11:31 pm

    I already figured it out myself

    <style name="CKButtons">
        <item name="android:windowBackground">@color/window_background</item>
        <item name="android:listViewStyle">@style/CKListview</item>
    </style>
    
    <style name="CKListview" parent="android:style/Widget.ListView">
        <item name="android:cacheColorHint">@color/window_background</item>
    </style>
    

    thanks.

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

Sidebar

Related Questions

I have a simple list with a listselector like so. <ListView android:id=@+id/list android:layout_width=fill_parent android:layout_height=fill_parent
I have a following class applied to a div. .pageGradientTop_T1 { background-color: #E8E8E8; border-bottom:
I want to make a DIV background (which doesn't have a background color) flash
I have some code that will change the background color of a specific label
I have a css rule defining the background color as the window system color
I have the following HTML page and the background color for the content is
My scenario: I have one color background image JPG. I have one black text
I have the following in a stylesheet: .tab { background-color: #1A1A1A; color: #A17749; font-family:
Say I have a class named testThing: .testThing { background-color:#000000; float:left; height:50px; width:50px; }
Let's say I have a header: header { background-color: $main-background-color; height: 86px; #headerContent {

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.