*** Not Animation Plus, in underlying Animation as well ***
Fred,
Ignore Everything I wrote, as I woke up, tried again with straight animation library, and get the same thing)
The problem was my MyTab panel... it gets redrawn at the end of the animation in original location, prior to the animationEnd call, thus getting a screen refresh when it is moved. Still don't know why the whole screen would "flash", or why I have to set the Panel's position to 0 before calling the animation, but at least it looks good now!
********* Ignore Below **************
when using the AnimationPlus to animate a panel into and out of view, the out works great (caveat, this is when I was going to approx 10% left of the activity, when starting in the middle, it "jumps" to the right when pushing in... it's in the sample code) ...(new Note, if I set asview.left to 0 before starting the out animation, then it is smooth)
However, if the panel is off the screen, I need to set the Panel.Left to 0, then start the animation, otherwise, it either doesn't animate at all, or if "enough" of it is on the screen, it will then animate, but a gap will be left if I do not set the panel.Left to no greater than the final position. And if I don't set it 0, then there is a "jump" to when it finishes the animation.
But, if I do set the panel.left to 0 before starting the animation, it will be smooth as butter sometimes, and then others, there will be a "flash" as if the display is drawing the panel all the way left, and then draws it back to where it should be.
Wondering if you can tell what I'm doing wrong?
Here is the initialization stuff:
Dim tempWidth As Int
tempWidth = vActivity.Width
If bRightSide Then
animPlusIn.InitializeTranslate("animIn", tempWidth - AsView.Width, AsView.Top, tempWidth, AsView.Top)
animPlusOut.InitializeTranslate("animOut", tempWidth - 1dip , AsView.Top, tempWidth - AsView.Width, AsView.Top)
Else
animPlusIn.InitializeTranslate("animIn", AsView.Width, AsView.Top, -AsView.Width, AsView.Top)
animPlusOut.InitializeTranslate("animOut", -AsView.Width, AsView.Top, AsView.Width, AsView.Top)
End If
animPlusIn.Duration = animspeed
animPlusOut.Duration = animspeed
animPlusOut.SetInterpolator(animPlusOut.INTERPOLATOR_LINEAR)
animPlusIn.SetInterpolator(animPlusIn.INTERPOLATOR_LINEAR)
and here's the call
If bRightSide Then
If AsView.Left >= vActivity.Width Then
AsView.Left = 0
vActivity.Invalidate
animPlusOut.Start(AsView)
animPlusOut.Start(myTab)
' AsView.Left = vActivity.Width - AsView.Width
Else
animPlusIn.Start(AsView)
myTab.Visible = False
End If
Else
If (AsView.Left+AsView.Width) <= vActivity.Left Then
animPlusOut.Start(AsView)
Else
animPlusIn.Start(AsView)
End If
End If
Ross
(the cHTabPanel is where the code lies, it is triggered in the MyTab_Click, and the AnimationPlus is set in the StartTabPanel call)