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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:14:52+00:00 2026-06-11T18:14:52+00:00

I have an app with a layout that loads some remote images. When the

  • 0

I have an app with a layout that loads some remote images. When the remote image is being loaded, a clock with 100 forced height is being displayed (i did it overwriting onDraw from imageview), and when the remote image is downloaded and ready to be displayed, the clock dissapears and then the image appears.

It works, but when the image appears did not receive the correct height, it still haves the height of the clock (100).

I dont know why, because when the image is displayed it calls a handler wich refresh the view of the image and the container layout of the image with the new height (365), but it is not working properly.

this is the handler:

    Handler handler = new Handler(){
        @Override
        public void handleMessage(Message msg) {                
            super.handleMessage(msg);   
            if( ((ImageView)view) != null && resource != null && resource.image != null ){
                ((ImageView)view).setImageBitmap( resource.image );                                 
                view.getLayoutParams().height=height;
                ((ViewGroup)view.getParent()).getLayoutParams().height=height;
                ((ImageView)view).invalidate(); 
                ((ViewGroup)view.getParent()).invalidate();
                ((ViewGroup)view.getParent()).refreshDrawableState();
                view.invalidate();                      
            }
        }           
    };

the handler is being called, the image is being displayed, the height value on the handler is correct (365), but the image is still being displayed with the height of the clock (100).

Also i must say that if i block the screen and unblock the screen, the image appears with the correct height (365). It seems that there is a problem with invalidate().

Thanks all

  • 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-11T18:14:54+00:00Added an answer on June 11, 2026 at 6:14 pm

    Solved

    I must reinstanciate the view each time i load the image element:

    view = new FocusableImageView( activity );

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

Sidebar

Related Questions

In my app i have a button that when click loads a new image
I have a class that extends android.app.Dialog, the layout is done in an xml
I have a rails app that creates a kml file and successfully loads it
I have an Android App that uses a TabHost layout. Every tab calls the
I have a basic Android question here: I have a main.xml layout that loads
I have an app that has 2 tabs. Each tab loads an xml file
I have to create a gridview that is loaded with images from a specific
I have an app that loads a flash video player inside a webview, i
Im making an app that shows images from a Tumblr account. It loads the
in my app i have activity with XML layout, i want to build an

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.