Why if I set the theme name of a cell in an ABMTable in "aRow1", the theme doesn't work?
Example that doesn't work:
Example that works:
Maybe i can't see the error but i can't find it if exists. Codes are the same, only changes the name from "aRow1", "aRow2" to "alt1", "alt2".
Someone can explain where is the problem?
Thanks in advance
Example that doesn't work:
B4X:
public Sub BuildTheme()
' start with the base theme defined in ABMShared
theme.Initialize("pagetheme")
theme.AddABMTheme(ABMShared.MyTheme)
' add your specific page themes
theme.AddTableTheme("tblTheme")
theme.Table("tblTheme").ZDepth = ABM.ZDEPTH_1
theme.Table("tblTheme").BackColor = ABM.COLOR_WHITE
theme.Table("tblTheme").AddCellTheme("aRow1")
theme.Table("tblTheme").Cell("aRow1").BackColor = ABM.COLOR_BLUEGREY
theme.Table("tblTheme").Cell("aRow1").BackColorIntensity = ABM.INTENSITY_LIGHTEN4
theme.Table("tblTheme").Cell("aRow1").ActiveBackColor = ABM.COLOR_GREEN
theme.Table("tblTheme").Cell("aRow1").ActiveBackColorIntensity = ABM.INTENSITY_LIGHTEN1
theme.Table("tblTheme").AddCellTheme("aRow2")
theme.Table("tblTheme").Cell("aRow2").BackColor = ABM.COLOR_WHITE
End Sub
Private Sub pagination_PageChanged(OldPage as Int, NewPage As Int)
'
'
'
Dim rs As ResultSet = Query
Do While rs.NextRow
Dim row As List = Array As String(rs.GetInt("ID"), rs.GetString("Field1"), rs.GetString("Field2"), rs.GetString("Field3"))
Dim rowTheme As List
rowTheme.Initialize
If alt Then
rowTheme.AddAll(Array As String("aRow1", "aRow1", "aRow1", "aRow1"))
Else
rowTheme.AddAll(Array As String("aRow2", "aRow2", "aRow2", "aRow2"))
End If
alt = Not(alt)
table.AddRow("uid" & c, row)
table.SetRowThemes(rowTheme)
c = c + 1
Loop
'
'
'
End Sub
Example that works:
B4X:
public Sub BuildTheme()
' start with the base theme defined in ABMShared
theme.Initialize("pagetheme")
theme.AddABMTheme(ABMShared.MyTheme)
' add your specific page themes
theme.AddTableTheme("tblTheme")
theme.Table("tblTheme").ZDepth = ABM.ZDEPTH_1
theme.Table("tblTheme").BackColor = ABM.COLOR_WHITE
theme.Table("tblTheme").AddCellTheme("alt1")
theme.Table("tblTheme").Cell("alt1").BackColor = ABM.COLOR_BLUEGREY
theme.Table("tblTheme").Cell("alt1").BackColorIntensity = ABM.INTENSITY_LIGHTEN4
theme.Table("tblTheme").Cell("alt1").ActiveBackColor = ABM.COLOR_GREEN
theme.Table("tblTheme").Cell("alt1").ActiveBackColorIntensity = ABM.INTENSITY_LIGHTEN1
theme.Table("tblTheme").AddCellTheme("alt2")
theme.Table("tblTheme").Cell("alt2").BackColor = ABM.COLOR_WHITE
End Sub
Private Sub pagination_PageChanged(OldPage as Int, NewPage As Int)
'
'
'
Dim rs As ResultSet = Query
Do While rs.NextRow
Dim row As List = Array As String(rs.GetInt("ID"), rs.GetString("Field1"), rs.GetString("Field2"), rs.GetString("Field3"))
Dim rowTheme As List
rowTheme.Initialize
If alt Then
rowTheme.AddAll(Array As String("alt1", "alt1", "alt1", "alt1"))
Else
rowTheme.AddAll(Array As String("alt2", "alt2", "alt2", "alt2"))
End If
alt = Not(alt)
table.AddRow("uid" & c, row)
table.SetRowThemes(rowTheme)
c = c + 1
Loop
'
'
'
End Sub
Maybe i can't see the error but i can't find it if exists. Codes are the same, only changes the name from "aRow1", "aRow2" to "alt1", "alt2".
Someone can explain where is the problem?
Thanks in advance