StickyScrollViewItems icon indicating copy to clipboard operation
StickyScrollViewItems copied to clipboard

Calculating dimensions of null views after removing views from ScrollView's child.

Open parkin opened this issue 11 years ago • 2 comments

I am getting an error when I remove views from the ScrollView's child. When I do so, the get*ForViewRelativeOnlyChild methods are being still being called. Because I have removed views, I am getting a null pointer error when view objects in these method are used.

parkin avatar Jan 28 '14 03:01 parkin

@emilsjolander, in the invalidateRunnable's run() method, what is the point of the posDelayed(this, 16) call? Is it necessary to invalidate the currentlyStickingView's area every 16ms?

parkin avatar Feb 11 '14 01:02 parkin

The way this is built now, yes. I built this a pretty long time ago and when i have the time i would like to re-write big parts. As i remember it i draw the sticking view manually so when providing the NON_CONSTANT flag on the sticky view indicating that this view's drawing can change at any time i need to invalidate the view on every frame to ensure that the view is drawn correctly. A re-write would make sure to let android's view framework handle the sticky view which would ensure that the drawing of the view was only updated when needed.

emilsjolander avatar Feb 12 '14 23:02 emilsjolander