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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:45:58+00:00 2026-06-10T20:45:58+00:00

I have problem to change the backgroud for the list view from a func

  • 0

I have problem to change the backgroud for the list view from a func

The listView receive the data from URL by JSON encdoe like that:

{"results":[
    {"db_id":"6","discount":"active","db_description":"bla bla bla ","db_num":"137","db_num2":"260"},
    {"db_id":"14","db_type":"discount","db_description":"blaaaaaaa","db_num":"39","db_num2":"46"},
    {"db_id":"18","db_type":"discount","db_description":"blaaaaaaa","db_num":"335","db_num2":"456"},
]}

my code:

                ListAdapter adapter = new SimpleAdapter(
                        QueueActivity.this, QueueList,
                        R.layout.queue_row, new String[] { TAG_ID, TAG_DESCRIPTION, TAG_NUM, TAG_NUM2, TAG_IMAGE},
                        new int[] { R.id.qid, R.id.description, R.id.num, R.id.num2, R.id.list_image });

                setListAdapter(adapter);

onListItemClick i can simplay update the background

protected void onListItemClick(ListView l, View v, int position, long id) {
       super.onListItemClick(l, v, position, id);
       v.setBackgroundResource(R.drawable.listview_taken_background);   
       TextView textid = (TextView) v.findViewById(R.id.queueid);
       textid.setText("NEW TEXT")
}

but i need to update the background from a func as well
how can i do it ?

for ex, the command new FuncName().execute(“2”); will set the backround resource for 2nd row to “R.drawable.listview_taken_background”

  • 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-10T20:46:00+00:00Added an answer on June 10, 2026 at 8:46 pm

    You can use ListView.getChildAt(int index) to return your View at this position then edit its background.

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

Sidebar

Related Questions

I have a problem to dismiss my progbar and to change to view that
I have a slight problem... we made a change to our url structure the
I have a problem with setting the click event in a list view item.
so I have a simple problem. I have a hover background image change effect,
I have problem with c# script who change user AD password, when try change
I have problem with dynamically created image (JavaScript). I want to change the innerHTML
I implemented the table sorter yesterday and i have a problem trying to change
I have a problem, I need to change body of method when this class
I have a problem with jQuery, I want to change a DIV (not the
I have this problem in my SlashDot Menu. I want to change the picture

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.