Replies: 1 comment 1 reply
-
hi @WileyNg how did you end up solving this? ugly way would be override the redraw with a check before actually redrawing? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hi @cwensley
AnimationProblem.mp4
I have yet another problem.
I made a Animated Drawable ExpanderBox as shown in the video.
I am using this class as a template to have a hierarchy of expanders expand and collapse in the Panel.
Every time a child expander starts expanding/collapsing, it finds the parent expander and do this:
parentExpander.Height = -1;
The problem is, every time the Height of any expander changes, it results in the Height change of the parent expander.
Every time its Height changes, all the controls inside the expander redraws itself (as shown in the video clip). Even though there was just 4 animated intervals, each control is redrawn for 9 times within the animated timeframe, which results in laggy animation.
Is it the only way to do it? I tried "freezing" the controls with SuspendLayout() but it doesn't work. The children controls are still redrawing themselves many times over when Height of parentExpander is changing.
Beta Was this translation helpful? Give feedback.
All reactions