M mkh_fx Member Licensed User Longtime User Jan 21, 2019 #1 i use below code to create CircularProgressBar in a panel dynamically CircularProgressBar is a XUI Library when run below code displayed a error Code: Copy Dim progress As CircularProgressBar progress.Initialize(Me,"progress") Panel1.AddView(progress,100dip,0,100dip,100dip) error: Code: Copy ** java.lang.IllegalArgumentException: method anywheresoftware.b4a.objects.PanelWrapper.AddView argument 1 has type android.view.View, got org.rahbord.shahrcharity.circularprogressbar at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:783) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:363) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:260) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175) at anywheresoftware.b4a.debug.Debug.delegate(Debug.java:259) at org.rahbord.shahrcharity.projects._showprojects(projects.java:497) at org.rahbord.shahrcharity.projects._loadlayout(projects.java:432) at org.rahbord.shahrcharity.projects._activity_create(projects.java:364) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:738) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:360) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:260) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144) at org.rahbord.shahrcharity.projects.afterFirstLayout(projects.java:104) at org.rahbord.shahrcharity.projects.access$000(projects.java:17) at org.rahbord.shahrcharity.projects$WaitForLayout.run(projects.java:82) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5221) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
i use below code to create CircularProgressBar in a panel dynamically CircularProgressBar is a XUI Library when run below code displayed a error Code: Copy Dim progress As CircularProgressBar progress.Initialize(Me,"progress") Panel1.AddView(progress,100dip,0,100dip,100dip) error: Code: Copy ** java.lang.IllegalArgumentException: method anywheresoftware.b4a.objects.PanelWrapper.AddView argument 1 has type android.view.View, got org.rahbord.shahrcharity.circularprogressbar at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:783) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:363) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:260) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175) at anywheresoftware.b4a.debug.Debug.delegate(Debug.java:259) at org.rahbord.shahrcharity.projects._showprojects(projects.java:497) at org.rahbord.shahrcharity.projects._loadlayout(projects.java:432) at org.rahbord.shahrcharity.projects._activity_create(projects.java:364) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:738) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:360) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:260) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144) at org.rahbord.shahrcharity.projects.afterFirstLayout(projects.java:104) at org.rahbord.shahrcharity.projects.access$000(projects.java:17) at org.rahbord.shahrcharity.projects$WaitForLayout.run(projects.java:82) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5221) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
DonManfred Expert Licensed User Longtime User Jan 21, 2019 #2 mkh_fx said: CircularProgressBar Click to expand... CircularProgressBar is not a view which you can add to a panel. Use the designer, add the CircularProgressBar to a layout and load this layout to the panel. Upvote 0
mkh_fx said: CircularProgressBar Click to expand... CircularProgressBar is not a view which you can add to a panel. Use the designer, add the CircularProgressBar to a layout and load this layout to the panel.
M mkh_fx Member Licensed User Longtime User Jan 21, 2019 #3 thank you my friend i create dynamic panel and loadlayout from my code but i need change each CircularProgressBar value from my code how to access each CircularProgressBar Which is dynamically created Upvote 0
thank you my friend i create dynamic panel and loadlayout from my code but i need change each CircularProgressBar value from my code how to access each CircularProgressBar Which is dynamically created
DonManfred Expert Licensed User Longtime User Jan 21, 2019 #4 The object (if you generated the member from the designer) is available after you loaded the layout. Upvote 0
J jtare Active Member Licensed User Longtime User Jan 23, 2019 #6 DonManfred said: The object (if you generated the member from the designer) is available after you loaded the layout. Click to expand... How can I edit the value of it? I added the CircularProgressBar to a customlistview, but when I want to edit the value how can I target only the CircularProgressBar that I want? Since is not a view, I can't get it from the panel. Upvote 0
DonManfred said: The object (if you generated the member from the designer) is available after you loaded the layout. Click to expand... How can I edit the value of it? I added the CircularProgressBar to a customlistview, but when I want to edit the value how can I target only the CircularProgressBar that I want? Since is not a view, I can't get it from the panel.
Erel B4X founder Staff member Licensed User Longtime User Jan 23, 2019 #7 You should never post a new question in an existing thread. Upvote 0