B4A Library Wrapper for KenBurnsView - an animated ImageView

Ken Burns Effect is a visual effect developed by director Ken Burns to animate photos, mostly in documentaries.


Now there is an ImageView available for Android called KenBurnsView that allows us to use this effect

https://github.com/flavioarfaria/KenBurnsView

Please develop a wrapper for this ImageView

687474703a2f2f7777772e70696374757265736861636b2e75732f696d616765732f31353532365f4b656e4275726e73566965772e676966
 

msa

Member
Licensed User
Longtime User
hi .
how to remove only zoom animation in this library ?
pleas answer my question .
 

migrec

Member
Licensed User
Longtime User
I can't see the views in front of the kenburnsview, seems like it won't sendtoback...
Is there a way around this?
 

migrec

Member
Licensed User
Longtime User
@Erel, also is there a way to skip the first transition (since it starts in the top-left corner and takes a while to get to the middle of the image...
 

Jerez

Active Member
Licensed User
Longtime User
The image is shown and kenburn effect is displayed... after few seconds... CRASH!

Looks like theme cause the crash.

B4X:
SetApplicationAttribute(android:theme, "@android:style/Theme.Holo.NoActionBar.TranslucentDecor")

With Holo works ok...
B4X:
SetApplicationAttribute(android:theme, "@android:style/Theme.Holo")


I've used this thread to fix my problem... i don't know if this is the best way:
https://www.b4x.com/android/forum/threads/changing-the-theme-at-runtime.57277/


B4X:
** Activity (main) Create, isFirst = true **
ExecuteMap: SELECT SERVER, APP_COLOR FROM SETTINGS
** Activity (main) Resume **
com.flaviofaria.kenburnsview.IncompatibleRatioException: Can't perform Ken Burns effect on rects with distinct aspect ratios!
    at com.flaviofaria.kenburnsview.Transition.<init>(Transition.java:53)
    at com.flaviofaria.kenburnsview.RandomTransitionGenerator.generateNextTransition(RandomTransitionGenerator.java:67)
    at com.flaviofaria.kenburnsview.KenBurnsView.startNewTransition(KenBurnsView.java:173)
    at com.flaviofaria.kenburnsview.KenBurnsView.onDraw(KenBurnsView.java:125)
    at android.view.View.draw(View.java:14888)
    at android.view.View.getDisplayList(View.java:13715)
    at android.view.View.getDisplayList(View.java:13762)
    at android.view.View.draw(View.java:14590)
    at android.view.ViewGroup.drawChild(ViewGroup.java:3252)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3070)
    at android.view.View.draw(View.java:14899)
    at android.view.View.getDisplayList(View.java:13715)
    at android.view.View.getDisplayList(View.java:13762)
    at android.view.View.draw(View.java:14590)
    at android.view.ViewGroup.drawChild(ViewGroup.java:3252)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3070)
    at android.view.View.getDisplayList(View.java:13707)
    at android.view.View.getDisplayList(View.java:13762)
    at android.view.View.draw(View.java:14590)
    at android.view.ViewGroup.drawChild(ViewGroup.java:3252)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3070)
    at android.view.View.getDisplayList(View.java:13707)
    at android.view.View.getDisplayList(View.java:13762)
    at android.view.View.draw(View.java:14590)
    at android.view.ViewGroup.drawChild(ViewGroup.java:3252)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3070)
    at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchDraw(PhoneWindow.java:2416)
    at android.view.View.draw(View.java:14899)
    at android.widget.FrameLayout.draw(FrameLayout.java:534)
    at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2396)
    at android.view.View.getDisplayList(View.java:13715)
    at android.view.View.getDisplayList(View.java:13762)
    at android.view.HardwareRenderer$GlRenderer.buildDisplayList(HardwareRenderer.java:1627)
    at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1506)
    at android.view.ViewRootImpl.draw(ViewRootImpl.java:2728)
    at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2593)
    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2216)
    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1192)
    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6231)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:816)
    at android.view.Choreographer.doCallbacks(Choreographer.java:619)
    at android.view.Choreographer.doFrame(Choreographer.java:588)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:802)
    at android.os.Handler.handleCallback(Handler.java:808)
    at android.os.Handler.dispatchMessage(Handler.java:103)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:5407)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:515)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:855)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:671)
    at dalvik.system.NativeStart.main(Native Method)



Bug fix?
https://github.com/flavioarfaria/KenBurnsView/issues/2
 
Last edited:
Top