Android Question Cannot Remove B4XImageView Bitmap

mmieher

Active Member
Licensed User
Longtime User
Reference:
https://www.b4x.com/android/forum/threads/b4ximageview-unload-bitmap.123842/#post-773670

I cannot seem to make this bitmap clear in my "big" project. A small project works just fine. I cannot think of what it could be, since this part of the biggie is fundamentally the same. I guess not, but I cannot see it. ExplosionOff just won't make the image go away.

B4X:
Private Sub ExplosionOn

    ExplosionPage.Initialize("")
    ExplosionPage.SetLayoutAnimated(0,0,0,100%x,100%y)
    ExplosionPage.LoadLayout("Explosion")
    MainPage.AddView(ExplosionPage,0,0,100%x,100%y)     '  Root.AddView does not work either
   
    ExplosionPage.SendToBack
   
End Sub

Private Sub ExplosionOff
   
    ''ExplosionPage.RemoveView
    ''ExplosionPage.RemoveAllViews
    ''b4xBoom.mBase.RemoveViewFromParent
    ''b4xBoom.mBase.RemoveAllViews
    ''xPanel.RemoveView
    ''xPanel.RemoveAllViews
   
    b4xBoom.Clear
    ''b4xBoom.Update        '    no difference
   
    Log("debug")
   
End Sub

"Explosion" layout is covered by a panel with a 100% area B4XImageView containing a Designer-infused bitmap.
 

Attachments

  • explosion.bal
    2.4 KB · Views: 83
  • main.bal
    8.9 KB · Views: 97

mmieher

Active Member
Licensed User
Longtime User
Sorry about the layout files. Thought one might be corrupt or something.

So is b4xBoom.Clear the one and only right thing to do?

This layout is called once and only once in the code. I have stepped all the way through.
 
Upvote 0
Top