B4A Library [B4X] [XUI] AS WheelPicker - Spinner - a modern single/multiple choice picker view - based on xCustomListView [Payware]

angel_

Well-Known Member
Licensed User
Longtime User
I have the same problem (iOS 12.5.2)

B4X:
Application_Start
*** mainpage: B4XPage_Created
*** Assertion failure in -[UIImpactFeedbackGenerator initWithConfiguration:coordinateSpace:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKitCore/UIKit-3698.140/UIFeedbackGenerator.m:124
Error occurred on line: 87 (ASWheelPicker)
Invalid configuration class (null) for generator <UIImpactFeedbackGenerator: 0x280671440: prepared=0>
Stack Trace: (
  CoreFoundation       <redacted> + 252
  libobjc.A.dylib      objc_exception_throw + 56
  CoreFoundation       <redacted> + 0
  Foundation           <redacted> + 112
  UIKitCore            <redacted> + 372
  UIKitCore            <redacted> + 192
  UIKitCore            <redacted> + 84
  CoreFoundation       <redacted> + 144
  CoreFoundation       <redacted> + 292
  B4i Example          +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1608
 B4i Example          -[B4INativeObject RunMethod::] + 216
 B4i Example          -[b4i_aswheelpicker _initialize::::] + 1364
 CoreFoundation       <redacted> + 144
 CoreFoundation       <redacted> + 292
 B4i Example          +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1608
 B4i Example          -[B4IShell runMethod:] + 448
 B4i Example          -[B4IShell raiseEventImpl:method:args::] + 2172
 B4i Example          -[B4IShellBI raiseEvent:event:params:] + 1580
 B4i Example          -[B4ICustomViewWrapper AfterDesignerScript] + 1828
 B4i Example          -[B4ILayoutBuilder loadLayout:::] + 2696
 B4i Example          -[B4IPanelWrapper LoadLayout::] + 204
 B4i Example          -[B4XViewWrapper LoadLayout::] + 100
 B4i Example          -[ResumableSub_b4xmainpage_B4XPage_Created resume::] + 676
 B4i Example          -[b4i_b4xmainpage _b4xpage_created::] + 548
 CoreFoundation       <redacted> + 144
 CoreFoundation       <redacted> + 292
 B4i Example          +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1608
 B4i Example          -[B4ICommon CallSubDebug4::::] + 1080
 B4i Example          -[B4ICommon CallSubDebug2::::] + 372
 B4i Example          -[b4i_b4xpagesmanager _createpageifneeded::] + 1152
 B4i Example          -[b4i_b4xpagesmanager _showpage::] + 828
 B4i Example          -[b4i_b4xpagesmanager _addpage:::] + 1428
 B4i Example          -[b4i_b4xpagesmanager _addpageandcreate:::] + 640
 B4i Example          -[b4i_b4xpagesmanager _initialize:::] + 1892
 B4i Example          -[b4i_main _application_start:] + 700
 CoreFoundation       <redacted> + 144
 CoreFoundation       <redacted> + 292
 B4i Example          +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1608
 B4i Example          -[B4IShell runMethod:] + 448
 B4i Example          -[B4IShell raiseEventImpl:method:args::] + 2172
 B4i Example          -[B4IShellBI raiseEvent:event:params:] + 1580
 B4i Example          __33-[B4I raiseUIEvent:event:params:]_block_invoke + 60
 libdispatch.dylib    <redacted> + 24
 libdispatch.dylib    <redacted> + 16
 libdispatch.dylib    <redacted> + 1068
 CoreFoundation       <redacted> + 12
 CoreFoundation       <redacted> + 1924
 CoreFoundation       CFRunLoopRunSpecific + 436
 GraphicsServices     GSEventRunModal + 104
 UIKitCore            UIApplicationMain + 212
 B4i Example          main + 128
 libdyld.dylib        <redacted> + 4
)
Application_Active

In Ipad (iOS 14.4.2.), it works fine
 

Alexander Stolte

Expert
Licensed User
Longtime User
ok, i did it, it is the "soft" variant of the vibrate, this is IOS 13+, i changed i to 0 = light.
Please redownload the lib.

i am currently working on an update to cover another usecase with this view, but currently i still have problems with the ListView at B4A. But I am confident to fix this in the next days.
 

Alexander Stolte

Expert
Licensed User
Longtime User
Big Update
2.00

  • Better Handling if you set an invalid wheel_index as parameter to the functions
  • Add get TopFadePanel
  • Add get BottomFadePanel
  • Fade Panels are now above and under the selector panel
  • Add Next - scrolls to the next item, jump to the last item if the next item is out of index

  • Add Previous - scrolls to the previous item, jump to the last item if the previous item is out of index
  • Add set CornerRadius - sets the corner radius of the view
    • Add Designer Property CornerRadius
  • SnapIn Improved - Immediately snaps into place without moving again
  • BugFixes
  • new depency: XUIViews, is needed for the HapticFeedback
Example Project with the new features you can find here

A backup with the previous version in case of problems, you can find in the 1st post.
 

Cyan

Member
Licensed User
Longtime User
Sorry dumb question from me, but according to the documentation, doesn't ItemTextProperties also need a setter? Currently it's a readonly property but the description mentions that it also sets the value.

 

Lisa I

Member
Licensed User
Hi I got the demo project up and running but I want to implement the ASWheelPicker into an existing B4A project. It is quite a large project and isn't built on B4APages.
I am struggling to work out if I can add a ASWheelpicker to this project, is it possible?

If so can you give me some pointers on how to get it going.

Thank you
 

Alexander Stolte

Expert
Licensed User
Longtime User
I am struggling to work out if I can add a ASWheelpicker to this project, is it possible?
I don't see why that shouldn't work.
There is nothing in the example project that is B4XPage only.

1. Add the wheelpicker to a form
2. add "wheels" like in the demo project
3. done
 

Lisa I

Member
Licensed User
I don't see why that shouldn't work.
There is nothing in the example project that is B4XPage only.

1. Add the wheelpicker to a form
2. add "wheels" like in the demo project
3. done

I have added the ASWheelPicker in the designer and generated members but keep getting the error
java.lang.RuntimeException: Class instance was not initialized (aswheelpicker)

B4X:
Dim carlist1 As List
    carlist1.Initialize
    carlist1.AddAll(Array As String("All",1,2,3))
    ASWheelPicker1.AddWheel(carlist1)
    ASWheelPicker1.ItemTextProperties.TextAlignment_Horizontal = "RIGHT"
    ASWheelPicker1.SeperatorProperties.BackgroundColor = ASWheelPicker1.mBase.Color
    ASWheelPicker1.SeperatorProperties.TextAlignment_Horizontal = "LEFT"
    ASWheelPicker1.SeperatorProperties.TextFont = xui.CreateDefaultBoldFont(15)



If I initialize it myself
B4X:
ASWheelPicker1.Initialize("me", "Me")
I get the error
java.lang.RuntimeException: Object should first be initialized (B4XView).

Have I missed something?
 

Lisa I

Member
Licensed User
So sorry I realised my mistake, I was calling the wrong page layout - duhhhh
 

Lisa I

Member
Licensed User
Can you set the width of a wheel? I have a long string of text in each list entry and it is splitting it on 2 lines despite the wheelpicker being longer than the text.

Cheers
 

Alexander Stolte

Expert
Licensed User
Longtime User
is splitting it on 2 lines despite the wheelpicker being longer than the text.
If you have e.g. 2 wheelpickers, then the width is divided by 2, so the text looks even at the end and not shifted.

Can you set the width of a wheel?
Currently not, but I could add it, with the seperators, I do that.
I have to see if it can be integrated.
 

Waldemar Lima

Well-Known Member
Licensed User
Longtime User
can u post source code ?
i would like to become a well b4x layout maker like yours ...
 

Alexander Stolte

Expert
Licensed User
Longtime User
can u post source code ?
buy the view, then you have the source code, pass on or share, I forbid. But I will not give the knowhow for free, the view cost me more than 48 hours of work...
 

Alexander Stolte

Expert
Licensed User
Longtime User
Cookies are required to use this site. You must accept them to continue using the site. Learn more…