Android Tutorial [B4X] B4XPlusMinus - Spinner / wheel alternative

Erel

Administrator
Staff member
Licensed User
B4XPlusMinus is a cross platform control introduced in XUI Views v2.05: https://www.b4x.com/android/forum/threads/b4x-xui-views-cross-platform-views-and-dialogs.100836/



As you can see in the above image it supports three different formations: horizontal, vertical and bottom. The bottom formation is useful with smaller controls to prevent the user finger from hiding the value.

There are two ways to set the values:

SetStringItems - A list or array with the items:
B4X:
pm.SetStringItems(Array("aaa", "bbb"))
SetNumericRange - A numeric range:
B4X:
pm.SetNumericRange(1, 100, 2) '1 - 100 with interval of 2.
Numeric values are converted to strings with the help of B4XFormatter.
The controls color and text size is set with the designer. Other options:


Cyclic - Whether to move to the first item after the last item.
Rapid - Whether to allow rapid changes with long clicks. Note that you can change the durations used for the rapid effect (RapidPeriod1 and RapidPeriod2 fields - default values are 1000ms and 30ms).

Example is attached.
 

Attachments

Alexander Stolte

Expert
Licensed User
i have this error on the example:
B4X:
java.lang.RuntimeException: java.lang.RuntimeException: Field b4xplusminus1 was declared with the wrong type.
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
    at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
    at b4a.exampleggsdg.main._activity_create(main.java:348)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
    at b4a.exampleggsdg.main.afterFirstLayout(main.java:104)
    at b4a.exampleggsdg.main.access$000(main.java:17)
    at b4a.exampleggsdg.main$WaitForLayout.run(main.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:6863)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.RuntimeException: Field b4xplusminus1 was declared with the wrong type.
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:431)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:454)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:148)
 

Mahares

Well Known Member
Licensed User
I downloaded: B4X Views but the library pane still shows: version 2.00 after refresh
EDIT: I had it in the additional lib folder. All is good now
 

Alexander Stolte

Expert
Licensed User
Can you post the unfiltered logs?
B4X:
Logger connected to:  OnePlus ONEPLUS A6003
--------- beginning of crash
FATAL EXCEPTION: main
Process: b4a.exampleggsdg, PID: 28117
java.lang.RuntimeException: java.lang.RuntimeException: Field b4xplusminus1 was declared with the wrong type.
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
    at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
    at b4a.exampleggsdg.main._activity_create(main.java:348)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
    at b4a.exampleggsdg.main.afterFirstLayout(main.java:104)
    at b4a.exampleggsdg.main.access$000(main.java:17)
    at b4a.exampleggsdg.main$WaitForLayout.run(main.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:6863)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.RuntimeException: Field b4xplusminus1 was declared with the wrong type.
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:431)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:454)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:148)
    ... 14 more
FATAL EXCEPTION: main
Process: b4a.exampleggsdg, PID: 28117
java.lang.RuntimeException: java.lang.RuntimeException: Field b4xplusminus1 was declared with the wrong type.
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
    at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
    at b4a.exampleggsdg.main._activity_create(main.java:348)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
    at b4a.exampleggsdg.main.afterFirstLayout(main.java:104)
    at b4a.exampleggsdg.main.access$000(main.java:17)
    at b4a.exampleggsdg.main$WaitForLayout.run(main.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:6863)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.RuntimeException: Field b4xplusminus1 was declared with the wrong type.
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:431)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:454)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:148)
    ... 14 more
FATAL EXCEPTION: main
Process: b4a.exampleggsdg, PID: 28310
java.lang.RuntimeException: java.lang.RuntimeException: Field b4xplusminus1 was declared with the wrong type.
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
    at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
    at b4a.exampleggsdg.main._activity_create(main.java:348)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
    at b4a.exampleggsdg.main.afterFirstLayout(main.java:104)
    at b4a.exampleggsdg.main.access$000(main.java:17)
    at b4a.exampleggsdg.main$WaitForLayout.run(main.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:6863)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.RuntimeException: Field b4xplusminus1 was declared with the wrong type.
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:431)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:454)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:148)
    ... 14 more
--------- beginning of main
Not starting debugger since process cannot load the jdwp agent.
The ClassLoaderContext is a special shared library.
preload b4a.exampleggsdg, 11ms, hwui=true, layout=false, decor=false
Skia GL Pipeline
Connecting to perf service.
Access denied finding property "vendor.debug.egl.profiler"
Access denied finding property "vendor.debug.prerotation.disable"
common created.
Starting remote logger. Port: 37274
After accept
*** Service (starter) Create ***
** Service (starter) Start **
onWindowFocusChangedFromViewRoot hasFocus: true, DecorView@9b82e45[main]
QUALCOMM build                   : f909f5a, Ida6448821d
Build Date                       : 11/12/18
OpenGL ES Shader Compiler Version: EV031.25.03.00
Local Branch                     :
Remote Branch                    : refs/tags/AU_LINUX_ANDROID_LA.UM.7.3.R1.08.00.00.423.039
Remote Branch                    : NONE
Reconstruct Branch               : NOTHING
Build Config                     : S P 6.0.3 AArch64
Access denied finding property "vendor.debug.prerotation.disable"
Access denied finding property "ro.vendor.graphics.memory"
Access denied finding property "vendor.debug.prerotation.disable"
Access denied finding property "vendor.debug.prerotation.disable"
PFP: 0x016ee170, ME: 0x00000000
Access denied finding property "vendor.debug.prerotation.disable"
android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 1
android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
** Activity (main) Create, isFirst = true **
Initialized EGL, version 1.4
Swap behavior 2
Access denied finding property "vendor.debug.egl.changepixelformat"
main_activity_create (java line: 348)
java.lang.RuntimeException: java.lang.RuntimeException: Field b4xplusminus1 was declared with the wrong type.
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
    at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
    at b4a.exampleggsdg.main._activity_create(main.java:348)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
    at b4a.exampleggsdg.main.afterFirstLayout(main.java:104)
    at b4a.exampleggsdg.main.access$000(main.java:17)
    at b4a.exampleggsdg.main$WaitForLayout.run(main.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:6863)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.RuntimeException: Field b4xplusminus1 was declared with the wrong type.
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:431)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:454)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:148)
    ... 14 more
FATAL EXCEPTION: main
Process: b4a.exampleggsdg, PID: 28310
java.lang.RuntimeException: java.lang.RuntimeException: Field b4xplusminus1 was declared with the wrong type.
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
    at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
    at b4a.exampleggsdg.main._activity_create(main.java:348)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
    at b4a.exampleggsdg.main.afterFirstLayout(main.java:104)
    at b4a.exampleggsdg.main.access$000(main.java:17)
    at b4a.exampleggsdg.main$WaitForLayout.run(main.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:6863)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.RuntimeException: Field b4xplusminus1 was declared with the wrong type.
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:431)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:454)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:148)
    ... 14 more
FATAL EXCEPTION: main
Process: b4a.exampleggsdg, PID: 30344
java.lang.RuntimeException: java.lang.RuntimeException: Field b4xplusminus1 was declared with the wrong type.
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
    at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
    at b4a.exampleggsdg.main._activity_create(main.java:348)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
    at b4a.exampleggsdg.main.afterFirstLayout(main.java:104)
    at b4a.exampleggsdg.main.access$000(main.java:17)
    at b4a.exampleggsdg.main$WaitForLayout.run(main.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:6863)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.RuntimeException: Field b4xplusminus1 was declared with the wrong type.
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:431)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:454)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:148)
    ... 14 more
getService:OPDiagnoseService NULL
OS Event: crash
Event success
Sending signal. PID: 30344 SIG: 9
Not starting debugger since process cannot load the jdwp agent.
The ClassLoaderContext is a special shared library.
type=1400 audit(0.0:184294): avc: denied { read } for comm=45474C20496E6974 name="u:object_r:vendor_default_prop:s0" dev="tmpfs" ino=21613 scontext=u:r:untrusted_app:s0:c225,c256,c512,c768 tcontext=u:object_r:vendor_default_prop:s0 tclass=file permissive=0
type=1400 audit(0.0:184295): avc: denied { read } for comm=45474C20496E6974 name="u:object_r:vendor_default_prop:s0" dev="tmpfs" ino=21613 scontext=u:r:untrusted_app:s0:c225,c256,c512,c768 tcontext=u:object_r:vendor_default_prop:s0 tclass=file permissive=0
Connecting to perf service.
Access denied finding property "vendor.debug.egl.profiler"
Access denied finding property "vendor.debug.prerotation.disable"
common created.
Starting remote logger. Port: 37274
Skia GL Pipeline
type=1400 audit(0.0:184296): avc: denied { read } for name="u:object_r:vendor_default_prop:s0" dev="tmpfs" ino=21613 scontext=u:r:untrusted_app:s0:c225,c256,c512,c768 tcontext=u:object_r:vendor_default_prop:s0 tclass=file permissive=0
*** Service (starter) Create ***
** Service (starter) Start **
onWindowFocusChangedFromViewRoot hasFocus: true, DecorView@9b82e45[main]
QUALCOMM build                   : f909f5a, Ida6448821d
Build Date                       : 11/12/18
OpenGL ES Shader Compiler Version: EV031.25.03.00
Local Branch                     :
Remote Branch                    : refs/tags/AU_LINUX_ANDROID_LA.UM.7.3.R1.08.00.00.423.039
Remote Branch                    : NONE
Reconstruct Branch               : NOTHING
Build Config                     : S P 6.0.3 AArch64
Access denied finding property "vendor.debug.prerotation.disable"
Access denied finding property "ro.vendor.graphics.memory"
Access denied finding property "vendor.debug.prerotation.disable"
Access denied finding property "vendor.debug.prerotation.disable"
PFP: 0x016ee170, ME: 0x00000000
Access denied finding property "vendor.debug.prerotation.disable"
** Activity (main) Create, isFirst = true **
android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 1
android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
Initialized EGL, version 1.4
Swap behavior 2
main_activity_create (java line: 348)
java.lang.RuntimeException: java.lang.RuntimeException: Field b4xplusminus1 was declared with the wrong type.
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
    at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
    at b4a.exampleggsdg.main._activity_create(main.java:348)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
    at b4a.exampleggsdg.main.afterFirstLayout(main.java:104)
    at b4a.exampleggsdg.main.access$000(main.java:17)
    at b4a.exampleggsdg.main$WaitForLayout.run(main.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:6863)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.RuntimeException: Field b4xplusminus1 was declared with the wrong type.
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:431)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:454)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:148)
    ... 14 more
Access denied finding property "vendor.debug.egl.changepixelformat"
FATAL EXCEPTION: main
Process: b4a.exampleggsdg, PID: 30344
java.lang.RuntimeException: java.lang.RuntimeException: Field b4xplusminus1 was declared with the wrong type.
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
    at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
    at b4a.exampleggsdg.main._activity_create(main.java:348)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
    at b4a.exampleggsdg.main.afterFirstLayout(main.java:104)
    at b4a.exampleggsdg.main.access$000(main.java:17)
    at b4a.exampleggsdg.main$WaitForLayout.run(main.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:6863)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.RuntimeException: Field b4xplusminus1 was declared with the wrong type.
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:431)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:454)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:148)
    ... 14 more
FATAL EXCEPTION: main
Process: b4a.exampleggsdg, PID: 30523
java.lang.RuntimeException: java.lang.RuntimeException: Field b4xplusminus1 was declared with the wrong type.
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
    at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
    at b4a.exampleggsdg.main._activity_create(main.java:348)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
    at b4a.exampleggsdg.main.afterFirstLayout(main.java:104)
    at b4a.exampleggsdg.main.access$000(main.java:17)
    at b4a.exampleggsdg.main$WaitForLayout.run(main.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:6863)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.RuntimeException: Field b4xplusminus1 was declared with the wrong type.
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:431)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:454)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:148)
    ... 14 more
getService:OPDiagnoseService NULL
OS Event: crash
Event success
After accept
Have you copied it to the internal libraries folder?
Yes
 

RWK

Member
Licensed User
Got it working in B4J

B4X:
Sub Process_Globals
    Private fx As JFX
    Private mainForm As Form
    Private B4XPlusMinus1 As B4XPlusMinus
    Private B4XPlusMinus2 As B4XPlusMinus
    Private B4XPlusMinus3 As B4XPlusMinus
    Private B4XPlusMinus4 As B4XPlusMinus
End Sub

Sub AppStart (Form1 As Form, Args() As String)
    mainForm = Form1
    mainForm.RootPane.LoadLayout("frmMain") 'Load the layout file.
    mainForm.Show
    
    B4XPlusMinus1.SetStringItems(File.ReadList(File.DirAssets, "cities.txt"))
    B4XPlusMinus1.Increment
    
    Dim clrs As List
    clrs.Initialize
    clrs.Add("Red")
    clrs.Add("Green")
    clrs.Add("Blue")
    B4XPlusMinus2.SetStringItems(clrs)
    B4XPlusMinus2.SelectedValue = clrs.Get(0)
    B4XPlusMinus3.SetNumericRange(0, 100, 1)
    B4XPlusMinus4.Formatter.GetDefaultFormat.MaximumFractions = 2
    B4XPlusMinus4.Formatter.GetDefaultFormat.MinimumIntegers = 2
    B4XPlusMinus4.Formatter.GetDefaultFormat.MinimumFractions = 2
    B4XPlusMinus4.SetNumericRange(0, 10, 1 / 3)
End Sub
Is the expected way to copy the b4x internal lib in each of the internal libraries folder...b4a, b4j, b4i
or better to remove internal libraries and put it in additional b4x ?

Ähmm....Nope Question:
How to assign b4xPlusMinus1 directly to the....say... third city in this case?

Grüße
Rainer
 

Erel

Administrator
Staff member
Licensed User
Is the expected way to copy the b4x internal lib in each of the internal libraries folder...b4a, b4j, b4i
Yes. The good news is that the latest version will be included when the IDE is updated.

How to assign b4xPlusMinus1 directly to the....say... third city in this case?
B4X:
Dim cities As List = File.ReadList(File.DirAssets, "cities.txt")
B4XPlusMinus1.SetStringItems(cities)
B4XPlusMinus1.SelectedValue = cities.Get(2)
 

Roberto P.

Well-Known Member
Licensed User
it would be interesting to add long press for automatic increased or decreised.
 

jimmyF

Active Member
Licensed User
It's there already! Press and hold, in the sample from the first post
 

Erel

Administrator
Staff member
Licensed User
it would be interesting to add long press for automatic increased or decreised.
Rapid - Whether to allow rapid changes with long clicks. Note that you can change the durations used for the rapid effect (RapidPeriod1 and RapidPeriod2 fields - default values are 1000ms and 30ms).
 

andyp

Member
Licensed User
Hi

For anyone looking: Visibility is controlled by: B4XPlusMinus1.mBase.Visible = False (or Ture)

Works really well thank you!
 
Last edited:
Top