I can only make the forward transition (effects.TransitionAnimated(1500,OriginalBmp,OriginalBmp2,ImageView1)) but crashes when I tried to swap (effects.TransitionAnimated(1500,OriginalBmp2,OriginalBmp,ImageView1)).
The code below is what I'm using for forward transition but I removed the code when trying to reverse.
My next question is , I notice that dogtwo.png file is larger than myQR.png this double the image(like tile) how can I make this FIT?
Hope anybody can help out.
Best regards.
The code below is what I'm using for forward transition but I removed the code when trying to reverse.
B4X:
Sub Globals
'These global variables will be redeclared each time the activity is created.
Private xui As XUI
Private ImageView1 As B4XView
Private OriginalBmp,OriginalBmp2 As B4XBitmap
Private effects As BitmapCreatorEffects
Private Button2 As Button
Private flag1 As Boolean
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
effects.Initialize
End Sub
Sub Button1_Click
OriginalBmp = LoadBitmap(File.DirAssets,"dogtwo.png")
effects.ImplodeAnimated(1500, OriginalBmp,ImageView1,50)
End Sub
Private Sub Button2_Click
If flag1 = False Then
OriginalBmp = LoadBitmap(File.DirAssets,"dogtwo.png")
OriginalBmp2 = LoadBitmap(File.DirAssets,"myQR.png")
effects.TransitionAnimated(1500,OriginalBmp,OriginalBmp2,ImageView1)
flag1 = True
Else
flag1 = False
End If
End Sub
Hope anybody can help out.
Best regards.
Attachments
Last edited: