I've got the same issue, except I'm wanting to load remote images and
have a place holder until they load.

>From what I can tell the problem is that setting the image on the
Button or ImageView is causing the entire gallery to be invalidated
and therefore creating all the views again and jumping to whichever
index was selected when the change occurred.  I'm wondering if
subclassing Button/ImageView whichever you need to use and could work
if you could prevent the entire parent from being invalidated.  Its a
little over my head experience wise though.  Hopefully one of the
Android devs can help us out.



On Jan 13, 6:06 am, dymmeh <[email protected]> wrote:
> I have a gallery of images, each with their own status. As I scroll
> through this list, I am updating a button's image in a toolbar
> separate from the gallery to correspond to that status..
>
> My problem is, onItemSelected fires when the image is about 3/4 on
> screen, this calls setImageResource on the button.. When this is
> called the gallery "jumps" to the selected item in the list instead of
> smoothly scrolling to it resulting in ugly UI use. If i remove the
> setImageResource code it scrolls smooth without any jumps.
>
> Curious if anyone knows what the problem is and how to fix it.
>
> The on item selected code is simply
>
> switch (img.status) {
>                     case Image.STATUS_AVAILABLE:
>
> mComboButton.setImageResource(R.drawable.ic_download);
>                         break;
>
> ...etc.
>
> }
>
> Thanks for any input

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to