Hi

I'm trying to update a view which belongs to a child of a GridView. The 
GridView is constructed using a custom adapter extending BaseAdapter which 
retrieves the items from an array, and the view created is stored in the 
object from the array, allowing me to access and update the view from a 
Handler.

This all seems to work fine, I can retrieve the TextView I want to update 
from the views stored in the object array and update them to display new 
text.

The problem is, the first item in the GridView doesn't update. The object 
from the array and its associated view both receive the updated text and 
this can be seen when debugging. The difference is that the actual UI 
doesn't change in the app, it stays as it is until another part of the code 
invalidates the entire GridView. Oddly, it does actually update once, the 
first time the update code is called from the Handler, its only from update 
2 onwards that nothing happens.

Here's the update code I'm using:

TextView tv = (TextView) this.view.findViewById(R.id.additional);
char[] ad = getAdditional().toCharArray();
tv.setText(ad, 0, ad.length);
tv.invalidate();

Seems very strange that the code works fine for all but the first item in 
the list - any suggestions?

Thanks :)
TBA

-- 
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