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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:12:08+00:00 2026-05-17T19:12:08+00:00

I have created four tabs using tabhost, and placed four listviews in each like

  • 0

I have created four tabs using tabhost, and placed four listviews in each like below:

public class prem extends ListActivity {

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle icicle) {
    super.onCreate(icicle);

    String[] names = new String[] { "Pr"};


    this.setListAdapter(new ArrayAdapter<String>(this,
            R.layout.simple_list_item_checked, names));
}

Problem is I have created background images for each listview but when I scroll the listview goes black.I know that I should add android:cacheColorHint="#00000000"
to the xml file to make the listview transparent, so I have created a new xml and id
and tried to add android:cacheColorHint="#00000000" in the xml to make transparent, but it just force closes;

this.setListAdapter(new ArrayAdapter<String>(this,
R.layout.list_item, R.id.listb, names));

?xml version="1.0" encoding="utf-8"?>

LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

    android:layout_width="wrap_content" 
    android:layout_height="wrap_content">
    <TextView android:text="@+id/TextView01" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:textSize="30px"></TextView>
     <ListView android:id="@+id/listb" 
     android:layout_height="wrap_content"
     android:layout_width="fill_parent">
     </ListView>
</LinearLayout>

  • 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-17T19:12:09+00:00Added an answer on May 17, 2026 at 7:12 pm

    Have you tried to add setCacheColorHint(00000000) in the prem java file?

    ListView lv = getListView();    
    lv.setCacheColorHint(00000000);    
    lv.setAdapter(new ArrayAdapter<String>(this,
            R.layout.simple_list_item_checked, names));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've created a tab bar application. I have four tabs; on the selected tab,
I have four tabs that hold four listviews, I want to set a background
I have created a plot made up of four subplots; each subplot is a
I have four tabs which the first one inserts data on the database, the
I have created a User Control with 4 check boxes(server control). I want to
I have created a very simple dummy program to understand Delegates and events. In
I'm not really sure what tools I should be using to create a desired
I am trying to figure out how to load different groupviews dynamically. I am
I am looking for expert advice on how to best serve multiple sites with

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.