B4A Library [Class]ClsWheel Input wheels

Espinosa4

Active Member
Licensed User
Longtime User
Hi Klaus,

Yes, I am.
In all android versions works fine but in Android 5.x.x the "problem" appears".

And yes, when a push the buttons the click event is fired again.

I don't know how to fix it. It is not a big problem. People can work perfectly but it is strange.
 
Last edited:

klaus

Expert
Licensed User
Longtime User
I saw it too on my Sony xperia Z1 withAndroid 5.0.2.
After adding this line SetApplicationAttribute(android:theme, "@android:style/Theme.Holo") to the Manifest Editor it works as expected again.

With this Manifest Editor content it works OK.
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="14"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
SetApplicationAttribute(android:theme, "@android:style/Theme.Holo")
'End of default text.
 

Espinosa4

Active Member
Licensed User
Longtime User
Thanks Klaus,

I'll edit the manifest and test the program and I'll comment but sure your reply is the answer to my problem..

Cheers
 

Espinosa4

Active Member
Licensed User
Longtime User
Hi Klaus,

Thank you for your help.
Following your advices all is OK now.

My API Level was 10. Now I am working with API 15 and all is OK.

Best regards,
Espinosa
 

AHilberink

Active Member
Licensed User
Longtime User
Hi Klaus,

3 weeks ago I downloaded your libary. Thank you for your sharing and nice work.

But I found a problem using the DATE scroll. For example: today it's 22. I changed it to 18. Then I changed the month. The day is changed of value, in my case 09.

I found the problem after testing in line 997:
B4X:
CurrentDayIndex = Floor(scvWheel(1).ScrollPosition / lblHeight + 0.5) - WheelContentNb(1)

Should be:
B4X:
CurrentDayIndex = Floor(scvWheel(2).ScrollPosition / lblHeight + 0.5) - WheelContentNb(2)

May be I am wrong, may be you already know, but for me it works fine now.

Best regards,
André
 

CaStar

Member
Licensed User
Longtime User
Show2 Example


Hello Klaus,
in your 1st post there is an error in your Show2 example. I spent a little time to figure this out because I did a simple "copy" of the statement and the closed procedure didn't start after closing the wheel.

The correct statement should be:

whlCustom.Show2("whlCustom", "")

 

AHilberink

Active Member
Licensed User
Longtime User
I wonder if someone experience this:
During showing the wheels, a user did use the external keyboard with for example a 1.

Error:
java.text.ParseException: Unparseable date: "1" (at offset 1)

Can I protect the user of using the keyboard? Is it possible to avoid this error?

Best regards,
André
 

cimperia

Active Member
Licensed User
Longtime User
You could wrap the code in a Try...Catch block?
 

Cebuvi

Active Member
Licensed User
Longtime User
Hi,

Using the class with B4A v7.01, this error occurs when replacing DoEvents for Sleep(0) in the Initialize Sub

Error compiling program.
Error description: Initialize sub cannot be resumable.

Can I make the change to Sleep (0) without having this error?.

Thanks

César
 

Star-Dust

Expert
Licensed User
Longtime User
Or no, do not ... I want my Doevents
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…