Dim CbMap As Map = Starter.md.GetC6LogMap(c6data.DateString)
If CbMap.Size = 0 Then
CbMap.Put("id", c6data.DateString)
CbMap.Put("parent_id", c6data.ExtraMap1.GetDefault("energy",""))
CbMap.Put("note1", "")
End If
CbMap.Put("ClvIndex", Index)
CbMap.Put("c6data", c6data)
' ----- ----- -----
' Layout
' ----- ----- -----
Dim PanelHeight As Int = 120dip
Dim p As Panel
p.Initialize("")
p.SetLayoutAnimated(0,0,0,0,c0tabCLV_c6list.AsView.Width, PanelHeight)
''p.Height = PanelHeight
p.LoadLayout("clvitemc6bs")
c6itemAction1.Visible = True
c6itempanelframe.SetColorAndBorder(Starter.xui.Color_Transparent, 2dip, 0x9E00FFFF, 4dip) ' azure, cyan
' --- Moon
c6itemimageview3Label.TextColor = Starter.MyColorBlack60
' --- Panel + frame
If c6data.IsToday Then
c6itempanelframe.Visible = True
c6itempanelframe.SendToBack
Else
c6itempanelframe.Visible = False
End If
' ----- ----- -----
' Content
' ----- ----- -----
c6itempaneltop.Color = Starter.MyColorPrimaryLight
c6itempaneltop.TextColor = Starter.TextColorLight
c6itempaneltop.Text = " " & c6data.DateString & " " & Starter.loc.Localize(c6data.WeekDayString)
LogColor("c6itempaneltop.text: " & c6data.DateString & " " & Starter.loc.Localize(c6data.WeekDayString), Colors.Blue)
' --- Notes
If CbMap.GetDefault("note1", "") <> "" Then
c6IconEd.Visible = False
Dim c6itemlabelnote2 As Label
c6itemlabelnote2.Initialize("c6itemlabelnote")
c6itemlabelnote2.Text = CbMap.GetDefault("note1", "")
c6itemlabelnote2.Multiline = True
c6itemlabelnote2.TextColor = Colors.Blue 'Starter.MyColorBlack54
c6itemlabelnote2.Color = Starter.MyColorBlack05
c6itemlabelnote2.Tag = CbMap
c6itempanelback.AddView(c6itemlabelnote2, 16dip, c6IconEd.top +4dip, c6IconEd.Width, c6itemlabelnote2.Text.MeasureHeight(Font.DEFAULT))
Dim c6labelHcalc As Float = c6itemlabelnote2.Text.MeasureHeight(Font.DEFAULT) + 20dip
Dim PanelHeight2 As Float = PanelHeight +c6labelHcalc
c6itemlabelnote2.Height = c6labelHcalc + 40dip
c6itemlabelnote2.Width = c6IconEd.Width
p.Height = PanelHeight2 + 40dip
c6itempanelback.Height = p.Height
c6itempanelframe.Height = c6itempanelback.Height
End If