Root = Root1
Root.LoadLayout("noticeboard")
B4XPages.SetTitle(Me, "Notice Board") 'Page title
Dim mi As B4AMenuItem = B4XPages.AddMenuItem(Me, "refresh")
mi.AddToBar = True
mi.Bitmap = xui.LoadBitmapResize(File.DirAssets, "ic_cached_white_24dp.png", 32dip, 32dip, True)
Dim mit As B4AMenuItem = B4XPages.AddMenuItem(Me, "Done")
mit.AddToBar = True
mit.Bitmap = xui.LoadBitmapResize(File.DirAssets, "ic_done_white_24dp.png", 32dip, 32dip, True)
Dim rs As ResultSet = B4XPages.MainPage.SQL.ExecQuery("SELECT anounce FROM anouncements")
Do While rs.NextRow
Dim row(6) As Object
If cursor1.RowCount > 0 Then
For i = 0 To cursor1.RowCount-1
cursor1.Position = i
row(0) = rs.GetString("anounce")
Dim Phoneg As String
Phoneg =rs.Getstring("anounce")
data.Add(row)
If row(0)=Null Then
Return
End If
Dim content As String = Phoneg
Log(content)
CLV1.Add(CreateItem(CLV1.AsView.Width, $"Anouncement #${i}"$, bitmaps.Get(0), content), "")
rs.Close
Loop
End If