I'm currently playing around with views, most of the time with views that change their content over time. In my test I ran into two problems, both related to invalidating the lists:
1. On a ButtonView, when changing the text, I call postInvalidate() since the update happens in a non UI-thread. It updates the text, but does not update the height of the button in case the text now requires more or less lines.
2. In a list, a separate thread is loading data into the list regularly. However, even when updating the list adapter (or even setting a new one) and calling postInvalidate() I get an exception "CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its view."
Seems I am doing something fundamentally wrong here in both cases. Maybe I do not understand how to handle views with changing data, so I'd be happy to hear what I should do differently. Thanks in advance!