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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:20:07+00:00 2026-05-22T22:20:07+00:00

I recently created a ListView using ListAdapter and applied a static background image behind

  • 0

I recently created a ListView using ListAdapter and applied a static background image behind the lists;

  String[] teams = getResources().getStringArray(R.array.array);
  setListAdapter(new ArrayAdapter<String>(this, R.layout.list_view, teams));

  ListView lv = getListView();
  lv.setTextFilterEnabled(true);

  lv.setBackgroundResource(R.drawable.football_turf_subtle);

  lv.setCacheColorHint(0);

I’m now switching to using SimpleAdapter to include a variety of items within each list item.

  setContentView(R.layout.custom_list_view);

  SimpleAdapter adapter = new SimpleAdapter(this, list, R.layout.row_view,
  new String[] {"pen","price","color"},
  new int[] {R.id.text1,R.id.text2, R.id.text3} );

  populateList();

  setListAdapter(adapter);

FYI, the items in the list above are from an example I found. The problem I’m running into is I’m not sure how to apply a background image as I had previously done with the ListAdapter version. (i.e. setBackgroundResource)

Any help would be appreciated!

  • 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-22T22:20:08+00:00Added an answer on May 22, 2026 at 10:20 pm
    <ListView android:cacheColorHint="#00000000" android:textSize="10dip"
        android:dividerHeight="1dip" 
        android:smoothScrollbar="true" android:background="@drawable/worldmap4"
        android:id="@+id/ListView01" android:layout_width="fill_parent"
        android:layout_height="fill_parent" android:clickable="true"
        android:drawingCacheQuality="auto" android:fastScrollEnabled="true"
        android:footerDividersEnabled="true" android:focusableInTouchMode="true"
        android:isScrollContainer="true" android:keepScreenOn="true"
        android:scrollbarStyle="outsideOverlay"></ListView>
    

    android:background=”@drawable/worldmap4″
    add this element in your xml file it is use for setting the static background of ListView.
    I hope this is help.

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

Sidebar

Related Questions

I've recently created these two (unrelated) methods to replace lots of boiler-plate code in
I'm a pretty new C# and .NET developer. I recently created an MMC snapin
I started a Rails project recently and decided to use RESTful controllers. I created
I recently created a turn-based game server that can accept 10s of thousands of
I recently created a site that simply has a variable and checks it against
I recently created an interface layer to distinguish the DataAccessProvider from our Business logic
I recently created an auto browser windows form app that browsers various places just
I recently created a advanced form with elements that use jquery's $().hide & $().show
I recently created my simple log4net database table for logging via the adonet appender..
I recently created a project skeleton with Edge Rails and installed rspec , rspec-rails

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.