Android Question Whick DatePicker for smartphone like S5 in landscape mode

Pisinho

Active Member
Licensed User
Longtime User
Hi,
I have a APP for Sasmung S5 in landscape mode. I use a AnotherDatePicker but is great than monitor.
DAtePicker return a error when I click on EditText for select a Date, I have a error in this point:

Public Sub Show
holder.Visible = True
DrawDays
End Sub


** Activity (main) Resume **
java.lang.RuntimeException: Object should first be initialized (Panel).

at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:46)
at anywheresoftware.b4a.objects.ViewWrapper.setVisible(ViewWrapper.java:211)
at com.aci.usair.anotherdatepicker._show(anotherdatepicker.java:789)
at com.aci.usair.anotherdatepicker._lbl_click(anotherdatepicker.java:669)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:174)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:158)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:66)
at android.view.View.performClick(View.java:4640)
at android.view.View$PerformClick.run(View.java:19421)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5579)


at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
at dalvik.system.NativeStart.main(Native Method)
--------- beginning of /dev/log/system

thanks in advance
 

Pisinho

Active Member
Licensed User
Longtime User
Hi Erel,
Datepicker library default without modify.

Sub Process_>Gobals
dim g as int
End SUb

Sub Globals
Dim ADP As AnotherDatePicker
End Sub

Sub Activity_KeyPress (KeyCode As Int) As Boolean
If KeyCode = KeyCodes.KEYCODE_BACK Then
If ADP.IsVisible Then
ADP.btnCancel_Click 'emulate a click on Cancel button
Return True
End If
End If
Return False
End Sub

Sub Button1_Click
Dim DataPartenza As String

DateTime.DateFormat = "yyyy-MM-dd"
DataPartenza = DateTime.Date(ADP.GetDate)




End Sub
 
Upvote 0

Pisinho

Active Member
Licensed User
Longtime User
Erel, it's possibile the problem cause is position of the DatePicker Layout on the Main Layout ? I have modify the Layout and the APP it's OK, but when I disconnect the device, the APP don't work fine.
 
Upvote 0

Pisinho

Active Member
Licensed User
Longtime User
Hi Erel,
I use AnotherDatePicker With Table and other user of B4A they told me they are not compatible ... I have used them separately in two activity and work fine. Other solution, create programmatically ADP and not using the designer, but I do not know how to do it. THANKS
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…