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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:31:46+00:00 2026-06-17T09:31:46+00:00

I was looking over internet a lot, but only found examples how to text

  • 0

I was looking over internet a lot, but only found examples how to text is changed every second or show even miliseconds.

I was using those examples to change picture when second was change, but timer was not accurate anymore. On image change the app respond with random delay for about 20 milisec or 200 milisec.

I was using class Runnable with postDelay and AsynTask where onPostExecute refresh UI, but both working exactly the same with lag.

What is the best practice to change picture every second?
And in the future I have an idea to start animation of 5 images every second (more fancy clock timer).

I would post my code, but now is really a mess of all examples I found till now.

  • 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-17T09:31:47+00:00Added an answer on June 17, 2026 at 9:31 am

    well you have not shared the code so I have to guess only,

    I would suggest to have the images as bitmap or drawable initialized already, may be in a hashtable.

    After that, start your timer and place the code to replace the image at right place.
    Point is you should not spend time other than replacing image in you thread.

    Edited:
    If you want to do it via code :

    before starting your animation create an array of Bitmaps not drawable ids (or the object of Drawble class).
    Why because you need to save time spent by system in creating the bitmaps from the ids you provide in array and then set to you image view.

    Also, you can use AnimateDrawbles for this which is very easy optimized and reliable.

    here is a sample.
    Just tune the duration variable in the xml according to your need.

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

Sidebar

Related Questions

I have been looking over the internet for a while about this, but it
I have been looking all over the internet and i found some good guides
I have been looking over the internet, but could not find the perfect tutorial
I've been looking over the internet for examples of implementing the observer pattern in
I'm semi-new to android. I've been looking all over the internet, but I can't
I have been looking all over the Internet for this and have found similar,
I have been looking all over the internet (googling pretty much) and have found
I've looked at many examples here and all over the internet, but I can't
I have a little / weird behaviour here and Im looking over internet and
I've been looking all over the internet for a solution to the following error;

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.