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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:38:02+00:00 2026-06-13T19:38:02+00:00

All, I have a problem related to imageView, android. I have array which contains

  • 0

All,

I have a problem related to imageView, android.
I have array which contains of 10 bitmap objects, called bm.
I have a imageView, called im.

Now I wanna show the bitmaps in the array in im one by one, so I did the following:

new Thread(new Runnable() {
       public void run() {
         for(int j=0;j<10;j++){
             im.setImageBitmap(bm[j]);
         }
       }
      }).start();

But the result only shows the last bitmap in the array.

Can someone tell me what to do with this issue?

Millions of thanks!

  • 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-13T19:38:03+00:00Added an answer on June 13, 2026 at 7:38 pm
    1. Don’t ever change a UI element in a thread. Most of the time this results in an exception. I don’t know why it didn’t here.

    2. You’re blasting through all ten images in a mere milliseconds. That’s why the last one is the only one you see. You need to slow it down.

    3. The easiest way would be the Handler/Runnable implementation like so:

      im.post(new Runnable() {   
         int j = 0;      
         @Override   
         public void run() {
            im.setImageBitmap(bm[j]);
            if(j++ < 10){
               im.postDelayed(this, 1000);
            }
         }
      });
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very strange array sorting related problem in PHP that is driving
This is Win32 related problem and all the code is native. I have 3
I am stuck in a problem which is related to ios 6. i have
Hi all I have problem with my div's in html. I have set them
I have problem using arabic font for iOS. All fonts have the same render,
i have problem with autorotate on iphone i set up in all classes -
I have a problem with random number generating in C# I have tried all
Possible Duplicate: USD Currency Formatting in Java All- I have a small problem in
I have no problem finding all tags for an object and getting the count
I have a problem where I get no errors nothing it all goes though

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.