0

I'm learning Basic4Android. I want to use animation when I want to go to another activity. I Paste anim (animation files' folder) in my project folder/objects/res/.

I wrote codes. When I compile my project, anim folder automatically be deleted. And then my emulator (You Wave) gives an error that there is no animation files. My codes:

Sub Button1_Click
Activity.Finish
StartActivity("Menu")
AnimateLayout.SetAnimation("file3","file4")
End Sub

and my animation module codes:

'Code module
Sub Process_Globals

End Sub

Sub SetAnimation(InAnimation As String, OutAnimation As String)
Dim r As Reflector
Dim package As String
Dim In, out As Int
package = r.GetStaticField("anywheresoftware.b4a.BA", "packageName")

In = r.GetStaticField(File.DirAssets &"/anim",InAnimation)
out = r.GetStaticField(package & ".R$anim", OutAnimation)
r.Target = r.GetActivity
r.RunMethod4("overridePendingTransition", Array As Object(In, out), Array As 
String("java.lang.int", "java.lang.int"))
End Sub

What can I do?

halfer
  • 19,824
  • 17
  • 99
  • 186

1 Answers1

0

You should set the anim folder or anim file to "read only" before compiling from basic4android.

I wish you good luck.

Thomas
  • 87,414
  • 12
  • 119
  • 157