Skip to content Skip to sidebar Skip to footer

How To Refresh Imageview In Android

I want to refresh imageview on bytearray received from socket. new Thread(new Runnable() { @Override public void run() { // TODO Auto-gener

Solution 1:

Either the image is coming same all the time, or it is coming only once. Because if you have triggered the above code correctly from the right place, it must refresh the imageView.

Try to debug it in different manner, code to refresh is ok.

Solution 2:

Sorry to all.The problem was that the above code was in the main thread,thus got blocking all responses to the UI.

The problem got solved when I moved the code to a thread from the main thread.Now it is working correctly.

Thanks for all replies

Post a Comment for "How To Refresh Imageview In Android"