I suppose that you found this project in the source code folder of the B4X SQLite database booklet.
Unfortunately, when I posted the last update I forgot to remove this project and the chapter, it was still in work.
Sorry for the trouble.
Currently, I am writing a new booklet B4X Cross-platform projects and there will be a new version of this project.
When you return from editing the Activity Resume function calls "ShowTable". which calls FillTable(Query).
This as the code which adds the extra columns on each return
B4X:
For i = 0 To Starter.ColNumber - 1
xtblTable.AddColumn(Starter.ColAliasNames(i), xtblTable.COLUMN_TYPE_TEXT)
Next
The way I got out of it was to remove above and have a CreateTable sub that is only called on Activity Create
B4X:
ub CreateTable
Log("CreateTable")
xtblTable.HeaderColor=Colors.RGB(32,179,220)
xtblTable.HeaderTextColor=Colors.Blue
xtblTable.EvenRowColor=Colors.LightGray
For i = 0 To Starter.ColNumber - 1
xtblTable.AddColumn(Starter.ColAliasNames(i), xtblTable.COLUMN_TYPE_TEXT)
Next
lblSelectedItem.Text=""
Sleep(0)
xtblTable.SearchField.mBase.Visible=False
End Sub