Android Question how do we Initialize B4XGifView ?

jchal

Active Member
Licensed User
Longtime User
hi all
i am trying to display an animated gif but i need to initialize it first as i am getting the following error and the application crashes
I am attaching the source code
 

Attachments

  • candle.zip
    160.8 KB · Views: 112
Last edited:

mangojack

Well-Known Member
Licensed User
Longtime User
Activity2 does not load any layout ... yet you declare the B4XGifView1 here , and in Activity_Create is this...
B4X:
B4XGifView1.SetGif(File.DirAssets, "candldeon.gif")


B4XMainPage loads "MainPage" layout which contains the B4XGifView ...

Declare the View and call the the above in B4XMainPage Class and the problem is solved.
Or load a layout in Activity2 than contains a B4XGifView.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…