Android Question [Solved] B4XPages and Custom transitions between activities (Interstitial Ad)

asales

Expert
Licensed User
Longtime User
I use this code to show a interstitial ad from left to right or vice versa:

The interstitial is annoy, but give a better revenue and is better with this effect (it don't shows suddenly).

The code is:
B4X:
mwAdInterstitial.Show
Utils.SetAnimation(Utils.ANIMATION_LEFT_RIGHT, Utils.ANIMATION_LEFT_RIGHT1)
I tried to update the Admob Example to use B4XPages, but when I use this code I get this error:
B4X:
utils_setanimation (java line: 208)
java.lang.NoSuchFieldException: No field left_right in class Lbr/com/testes/R$anim; (declaration of 'br.com.testes.R$anim' appears in /data/app/br.com.testes-2/base.apk)
    at java.lang.Class.getDeclaredField(Native Method)
    at anywheresoftware.b4a.agraham.reflection.Reflection.GetStaticField(Reflection.java:371)
    at br.com.as2.testes.utils._setanimation(utils.java:208)
    at br.com.as2.testes.b4xpageinter._button1_click(b4xpageinter.java:55)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:193)
    at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
    at android.view.View.performClick(View.java:5612)
    at android.view.View$PerformClick.run(View.java:22285)
    at android.os.Handler.handleCallback(Handler.java:751)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6123)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757)

Is possible to use this transitions with B4XPages?
 
Top