Android Question [Solved: Forgot "SetLayout"] Unknown Layout/Panel Problem

LWGShane

Well-Known Member
Licensed User
Longtime User
It happens when I either create a game or load a game. The bug is in the "BalanceView" activity; project is attached.

** Activity (main) Pause, UserClosed = false **
** Activity (viewgames) Create, isFirst = true **
** Activity (viewgames) Resume **
** Activity (viewgames) Pause, UserClosed = false **
** Activity (balanceview) Create, isFirst = true **
Panel size is unknown. Layout may not be loaded correctly.
Error occurred on line: 33 (BalanceView)
java.lang.RuntimeException: java.lang.IllegalArgumentException: Cannot set 'scaleX' to Float.NaN
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
at anywheresoftware.b4a.objects.PanelWrapper.LoadLayout(PanelWrapper.java:134)
at com.dvslayer42.virtualbank.balanceview._createplayerlabel(balanceview.java:462)
at com.dvslayer42.virtualbank.balanceview._insertgamedata(balanceview.java:405)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:710)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:342)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:139)
at com.dvslayer42.virtualbank.balanceview.afterFirstLayout(balanceview.java:104)
at com.dvslayer42.virtualbank.balanceview.access$000(balanceview.java:17)
at com.dvslayer42.virtualbank.balanceview$WaitForLayout.run(balanceview.java:82)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6680)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.IllegalArgumentException: Cannot set 'scaleX' to Float.NaN
at android.view.View.sanitizeFloatPropertyValue(View.java:15425)
at android.view.View.sanitizeFloatPropertyValue(View.java:15399)
at android.view.View.setScaleX(View.java:14788)
at android.animation.PropertyValuesHolder.nCallFloatMethod(Native Method)
at android.animation.PropertyValuesHolder.access$400(PropertyValuesHolder.java:38)
at android.animation.PropertyValuesHolder$FloatPropertyValuesHolder.setAnimatedValue(PropertyValuesHolder.java:1387)
at android.animation.ObjectAnimator.animateValue(ObjectAnimator.java:990)
at android.animation.ValueAnimator.setCurrentFraction(ValueAnimator.java:674)
at android.animation.ValueAnimator.setCurrentPlayTime(ValueAnimator.java:637)
at android.animation.ValueAnimator.start(ValueAnimator.java:1069)
at android.animation.ValueAnimator.start(ValueAnimator.java:1088)
at android.animation.ObjectAnimator.start(ObjectAnimator.java:852)
at android.animation.ValueAnimator.startWithoutPulsing(ValueAnimator.java:1081)
at android.animation.AnimatorSet.handleAnimationEvents(AnimatorSet.java:1142)
at android.animation.AnimatorSet.startAnimation(AnimatorSet.java:1227)
at android.animation.AnimatorSet.start(AnimatorSet.java:729)
at android.animation.AnimatorSet.start(AnimatorSet.java:684)
at anywheresoftware.b4a.objects.ViewWrapper.AnimateFrom(ViewWrapper.java:461)
at anywheresoftware.b4a.keywords.LayoutBuilder.animateLayout(LayoutBuilder.java:191)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:165)
... 19 more
** Activity (balanceview) Resume **
 

Attachments

  • VirtualBank.zip
    24.1 KB · Views: 347

LWGShane

Well-Known Member
Licensed User
Longtime User
Update: I figured it out - I forgot to use P.SetLayout and that is what was causing the error.
 
Upvote 0
Top