I have an app that has been running for a couple of years, the client I developed this for just noticed a strange issue. They have installed it on some new phones that have slightly lower resolution screens than they were using previously, and now some fields are cutting the text off in the display. I have tracked this down to any field that a AnotherDatePicker has been attached to. This app uses V 1.11 of AnotherDatePicker, I tried to update to a newer version thinking that something may have been done to correct this issue, however the ability to attach a DatePicker to a text field in code has been removed (AddToActivity) , in any case looking thru the code it doesn't appear that anything is done to the label the date is displayed in other than set the Text value.
Here is an example of the display The Date field has a AnotherDatePicker attached, the Date Thru Field has had the code to add the datepicker commented out. (Code shown at the bottom)
I use a script in the Designer for this activity to size and place all of the fields.
Any idea why the difference in the display?
Here is an example of the display The Date field has a AnotherDatePicker attached, the Date Thru Field has had the code to add the datepicker commented out. (Code shown at the bottom)
I use a script in the Designer for this activity to size and place all of the fields.
Any idea why the difference in the display?
B4X:
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim bar As StdActionBar
Private lblTotal As Label
Private Panel2 As Panel
Private txtEDate As Label
Private txtSDate As Label
Private viewDate1 As AnotherDatePicker
Private viewDate2 As AnotherDatePicker
Dim tblTime As Table
Dim tblTime2 As Table
Private btnGo As Button
Private txtTotal As Label
Private Panel4 As Panel
Private Panel3 As Panel
Private Panel1 As Panel
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("TimeReview")
Activity.Title="Time Transaction Inquiry"
bar.Initialize("bar")
' bar.Icon = LoadBitmap(File.DirAssets, "tool-kit-icon.png")
bar.ShowUpIndicator = True
Activity.AddMenuItem3("","mnuSend", LoadBitmap(File.DirAssets, "arrow_up.png"), True)
DateTime.DateFormat = "yyyy-MM-dd"
viewDate1.Initialize(Me,"viewDate1")
viewDate1.AddToActivity(Activity,txtSDate)
'viewDate2.Initialize(Me,"viewDate2")
'viewDate2.AddToActivity(Activity,txtEDate)
txtSDate.Color = Colors.Black 'set colors manually after connecting DatePicker as Designer is ignored at this point'
txtEDate.Color = Colors.Black
txtSDate.TextColor = Colors.White
txtEDate.TextColor = Colors.White
txtSDate.Gravity = Gravity.CENTER
txtEDate.Gravity = Gravity.CENTER