B4A Library [B4X] AS WheelDateTimePicker - based on ASWheelPicker

Alexander Stolte

Expert
Licensed User
Longtime User
works fine here in release mode. I saved a file in the first page -> open the second page -> save a file again -> works fine
Did you have the newest AS_WheelPicker version?
 

marcick

Well-Known Member
Licensed User
Longtime User
works fine here in release mode. I saved a file in the first page -> open the second page -> save a file again -> works fine
Did you have the newest AS_WheelPicker version?

uhmm .... I think yes. 3.21
And B4A 12.80
 

marcick

Well-Known Member
Licensed User
Longtime User
The crash is only in release mode, both on a real device and Android Studio emulator
 

marcick

Well-Known Member
Licensed User
Longtime User
And what is the error message?

As I click on "save file" this is the error:

B4X:
RDC total: 0 records, time = 0.208 sec
** Activity (main) Pause event (activity is not paused). **
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
** Activity (main) Resume **
** Activity (main) Pause event (activity is not paused). **
java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 654596 bytes
Bundle stats:
  android:viewHierarchyState [size=654332]
    android:views [size=653732]
PersistableBundle stats:
  [null]
    at android.app.servertransaction.PendingTransactionActions$StopInfo.run(PendingTransactionActions.java:146)
    at android.os.Handler.handleCallback(Handler.java:958)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:205)
    at android.os.Looper.loop(Looper.java:294)
    at android.app.ActivityThread.main(ActivityThread.java:8177)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
Caused by: android.os.TransactionTooLargeException: data parcel size 654596 bytes
    at android.os.BinderProxy.transactNative(Native Method)
    at android.os.BinderProxy.transact(BinderProxy.java:584)
    at android.app.IActivityClientController$Stub$Proxy.activityStopped(IActivityClientController.java:1439)
    at android.app.ActivityClient.activityStopped(ActivityClient.java:96)
    at android.app.servertransaction.PendingTransactionActions$StopInfo.run(PendingTransactionActions.java:135)
    ... 8 more
 

marcick

Well-Known Member
Licensed User
Longtime User
I mean I abandon this library because doesn’t suit my needing and has problems (but it works at your home so, peace and love). I come back to standard spinner and date picker. Thanks for your support.
 

Alexander Stolte

Expert
Licensed User
Longtime User
TransactionTooLargeException
The problem lies with the device. The DatePicker adds a large number of items to the list so that you can select 2 years into the past and 2 years into the future.
And can be solved by using the "MinDate" property before calling ".Create". And give this e.g. the value DateTime.Now, then the list is smaller and your device does not get into a memory problem.

I abandon this library because doesn’t suit my needing
If it doesnt suit your needing, then do it with the AS_WheelPicker with your own items?
Thanks for your support.
No Problem.
 

marcick

Well-Known Member
Licensed User
Longtime User
Understand.
why didn’t you give before this explanation if you knew it ?
I like much the appearance of your picker that looks like IOS style and I’m distributing the App for both platforms (better if it has the same look) but I have to abandon it for these reasons:
  1. We are in Italy and I want the date time is represented as we in Italy are used to
  2. In my application I can’t limit the time span. I could limit the future to today (there are no data to show for the future) but two years in the past is also not enough.
 

Alexander Stolte

Expert
Licensed User
Longtime User
why didn’t you give before this explanation if you knew it ?
Because I had a lot to do privately and had no opportunity to check on the PC?
but two years in the past is also not enough.
Then a normal DatePicker is more suitable, as a user I would not want to scroll through over 730 days to select a date that is more than 2 years in the past.
 

Alexander Stolte

Expert
Licensed User
Longtime User
We are in Italy and I want the date time is represented as we in Italy are used to
Italy has the same date format as Germany. But it is simply not possible to redesign the whole thing in a view which is a 2 in 1 view so that everything is dynamic, especially if you can only work with index. A custom solution would be much better.
 

MarcoRome

Expert
Licensed User
Longtime User
Hi dear.
I use rel. 3.23 WheelPicker and rel.1.15 As_WheelDateTimePicker
I have this code:
B4X:
Sub B4XPage_Appear
    
    AS_WheelDateTimePicker3.Date = DateTime.Now
    AS_WheelDateTimePicker3.Hour = DateTime.GetHour(DateTime.Now)
    AS_WheelDateTimePicker3.Minute = DateTime.GetMinute(DateTime.Now)
    
    AS_WheelDateTimePicker3.MinDate = DateTime.Now + DateTime.TicksPerDay
    AS_WheelDateTimePicker3.MaxDate = DateTime.Now + DateTime.TicksPerDay*5
        
        
    AS_WheelDateTimePicker3.MonthNameShort =      AS_WheelDateTimePicker3.CreateASWheelDateTimePicker_MonthNameShort("Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic")
    AS_WheelDateTimePicker3.WeekNameShort = AS_WheelDateTimePicker3.CreateASWheelDateTimePicker_WeekNameShort("Lun","Mar","Mer","Gio","Ven","Sab","Dom")
    AS_WheelDateTimePicker3.Refresh
End Sub

The minimum date is respected, the maximum date continues regardless of the line code

B4X:
AS_WheelDateTimePicker3.MaxDate = DateTime.Now + DateTime.TicksPerDay*5

Where i wrong ?
 

Alexander Stolte

Expert
Licensed User
Longtime User
Hi, please make a new thread for any questions you have. And please provide an example project that shows all your settings and the behavior. Thank you very much, have a good start into the week.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…