一个关于B4XPreferencesDia库日期选择器中星期显示不完整的问题!An issue with incomplete week display in the B4XPreferencesDia library date picker!

hzq200409

Member
Licensed User
如题,在B4J中B4XPreferencesDia库日期选择器的星期显示不完整.具体表现如下:
As in the question, the B4XPreferencesDia library date picker shows an incomplete week in B4J. The specific performance is as follows:

日期.png


我想是因为日期选择器开发者没有使用星期缩写的原因吧.例如:Wennesday(一般翻译为完整的"星期三") 和Wed. (周三)
I think it's because the date picker developers didn't use abbreviations for days of the week. For example: Wennday (generally translated as the full "星期三") and Wed("周三").
如果可能,我该怎么去修改它?
If possible, how can I change it?
例如这样的效果:
For example, something like this:
日期2.png
 
Last edited:

aeric

Expert
Licensed User
Longtime User
B4X:
Sub Class_Globals
    Private Root As B4XView
    Private xui As XUI
    Private PrefDialog1 As PreferencesDialog
End Sub

Public Sub Initialize
'    B4XPages.GetManager.LogEvents = True
End Sub

'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("MainPage")
    Dim jo As JavaObject
    jo.InitializeStatic("java.util.Locale").RunMethod("setDefault", Array(jo.GetField("CHINESE")))
    CreateDialog1
End Sub

Private Sub B4XPage_Resize(Width As Int, Height As Int)
    If PrefDialog1.IsInitialized And PrefDialog1.Dialog.Visible Then PrefDialog1.Dialog.Resize(Width, Height)
End Sub

Private Sub CreateDialog1
    PrefDialog1.Initialize(Root, "Dialog", 300dip, 70dip)
    PrefDialog1.Dialog.OverlayColor = xui.Color_ARGB(128, 0, 10, 40)
    PrefDialog1.AddDateItem("Value", "Birthday")
    PrefDialog1.DateTemplate.DaysOfWeekNames = Array As String("周日", "周一", "周二", "周三", "周四", "周五", "周六")
End Sub

Private Sub ShowDialog1 (Item As Map)
    Dim sf As Object = PrefDialog1.ShowDialog(Item, "OK", "CANCEL")
    Wait For (sf) Complete (Result As Int)
    If Result = xui.DialogResponse_Positive Then
        Log(Item)
    End If
End Sub


Private Sub Button1_Click
    ShowDialog1(CreateMap())
End Sub
 
Last edited:
Top