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

  • Home
  • SEARCH
  • 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 8876869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:19:22+00:00 2026-06-14T19:19:22+00:00

I am having an issue when attempting to update a TextView’s text. I have

  • 0

I am having an issue when attempting to update a TextView’s text.

I have a MainActivity in which i have created a layout with an empty ListView.
To fill this ListView with custom ListItems i have created a custom AsyncTaskLoader that retrieves information to fill onto the ListItems and also a custom BaseAdapter that fills the data loaded into the ListItems.

This part has no errors and it does it just perfectly.

However, i am having an issue when attempting to update the text on a TextView from a ListItem in the ListView.
You see, i have created a custom CountDownTimer which takes an interface called OnTickListener as parameter in the constructor.
I have a unique id for each time i created a ListItem and i am using this to store the TextView for that ListItem in a HashMap and also to store the CountDownTimer in a HashMap. These HashMaps are created and kept inside the custom BaseAdapter.

The BaseAdapter also implements OnTickListener.

Every time a MyCountDownTimer calls OnTick it calls the OnTickListener provided to it in the constructor and passes two parameters: int id and String text.

This will call the BaseAdapters implementaton of OnTickListener’s only method: public void OnTick(int id, String text).

In the onTick method i do the following:

  1. Find the TextView for the id in the HashMap i mentioned earlier.
  2. Update the TextViews text.

Now this seems to work in some way. Because if i scroll up and down i can see that the text on the TextViews will be updated once it is shown on the screen again. But it does not update the TextView if it is already shown on the screen.
I have tried to call TextView.invalidate() and TextView.postInvalidate(). In my desperation i even tried creating a Handler that would post a Runnable which would try to update the TextView.

But nothing seems to be working. Got any ideas as to how i may be able to update the TextView?

TL DR:
I need to know how i can update a TextView inside a ListItem – that is part of an Activity – from a CountDownTimer created in a BaseAdapter.

Sorry for the wall of text ^^”

  • 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-14T19:19:24+00:00Added an answer on June 14, 2026 at 7:19 pm

    You should update the ‘data’of the adapter,that data should contain the content of each item that will be displayed on each textview.

    Then call notifydatasetchanged() on the adaprer.

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

Sidebar

Related Questions

I am having an issue on my site where I am attempting to load
I'm having an issue with IIS, attempting to reach a virtual folder path. My
Hi guys I am having issue I have this query: SELECT * FROM useraccount
Just started mongo and started having issue with querying already. i have a collection
I am attempting to learn oCaml and am having an issue as to why
I'm having an issue with texture mapping in OpenGL. I'm attempting to apply different
I'm having an issue with the following query. With the query I'm attempting to
I am having an issue with the way these tables I am attempting to
I am having an issue using the OOXML library when attempting to read encrypted
I am having an issue with showing and hiding two divs. I have two

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.