Android Question BitmapCreator Implementation For Transition Effect

Juzer Hussain

Active Member
Licensed User
Longtime User
Hello Everyone,

I have an image in a layout which i am adding to scrollview in runtime.
I want to add effect to this image thru B4XBitmapEffects. I am following the link https://www.b4x.com/android/forum/threads/b4x-bitmapcreator-effects.93608/
i am finding it difficult to implement.

Can someone give a simple implementation.

my code looks like this

B4X:
Dim Pnl1 As B4XView=xui.CreatePanel("Pnl1")

    Pnl1.LoadLayout("Pnl_GroupInfoHeader")
    
    lblGroupCode.Text=sGroupCode3.ToUpperCase
    lblGroupName.Text=sGroupName3.ToUpperCase
    lblGroupType.Text=sGroupType3.ToUpperCase
    lblRemarks.Text=sRemarks3.ToUpperCase
    
    Dim OriginalBmp,ToBmp As B4XBitmap
    OriginalBmp = xui.LoadBitmapResize(File.DirAssets, "pen.png",250, 250, False)
      
    ivlogo.SetBitmap(OriginalBmp)
    sv3.Panel.AddView(Pnl1,0,0,sv3.panel.Width,46%y)
    effects.Initialize
    effects.ImplodeAnimated(1500, OriginalBmp, sv3.Panel.GetView(0), 4)

the effect shows but momentarily and the bmp pops up

Can some give some clue.

Thanks
 

Juzer Hussain

Active Member
Licensed User
Longtime User
Thanks EREL,

I changed sv3.panel.getview(0) to PnlX now animation is happening but it seems there is no need for above 2 corrections.
instead if i set animation duration to 0 it does not work.

For some reason animation is not happening inside SV it runs first momentarily and then SV overwrites it.

Can you please point me to any code where it is implemented without CLV or SV. ?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…