Satya Komatineni schrieb:
For a UI action in the same thread:
//On my view I call requestLayout()
ViewRoot schedules a traversal
//I don't call invalidate() on my view
So, no rectangle is invalid (I am assuming that is the assertion
because I didn't call invalidate)
Is it possible that the layout phase may invalidate() some of the
views? I suppose for those views that don't change their position or
size, I am assuming onDraw() won't be called.
Wondering if someone could comment on this.
Thanks a lot.
Satya
Maybe you are not dealing with GridView? But in case:
I recently wanted to refresh a GridView. And tried
first requestLayout(). Nothing happened. I then tried
invalidate(). Again nothing happened. So finally I
went for invalidateViews(), which was fine.
But this is AbsListView specific (*):
public void invalidateViews ()
Causes all the views to be rebuilt and redrawn.
And I would be more happy if I could invalidate a
single grid element separately, when I know that only
the appearance changed. But I did not yet have time
to figure this out.
Bye
P.S.:
Some source code for GridView says:
/**
* Causes all the views to be rebuilt and redrawn.
*/
public void invalidateViews() {
mDataChanged = true;
rememberSyncState();
requestLayout();
invalidate();
}
And in AdapterView:
/**
* True if the data has changed since the last layout
*/
boolean mDataChanged;
--
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