Android Question CustomListView flicker on refresh

sigster

Active Member
Licensed User
Longtime User
Hi

I am using CustomListView with BottomMenu
I use middle buttom to refresh the listview but it flicker so I can see Label I have behind the Listview

[XUI] AS BottomMenu
https://www.b4x.com/android/forum/threads/b4x-xui-as-bottommenu.96244/#content

B4X:
    Listv.Clear
        Try
        Dim sf As Object = Starter.mysql.ExecQueryAsync("mysql", "MY-SQL-STRING", Null)
            Wait For (sf) mysql_QueryComplete (Success As Boolean, Crsr As JdbcResultSet)
            If Success Then
                Do While Crsr.NextRow
                    'Log(Crsr.GetString("Name"))                   
                Listv_fyrirtaki.Add(CreateListItemVerktakar(Crsr.GetString("Name"), Listv_fyrirtaki.AsView.Width, 60dip), Crsr.GetString("Name"))   
                    Loop
                Crsr.Close
            End If
        Catch
            Success = False
            Log(LastException)
    End Try
 

ronell

Well-Known Member
Licensed User
Longtime User
hide the label after you refresh the list, then make it visible again after repopulating the listview
 
Upvote 0

Peter Simpson

Expert
Licensed User
Longtime User
Is the list flashing in release mode as well as debug mode?

You could always try adding Sleep(0) or Sleep(100) after 'Listv.Clear', but that should really make no difference and map cause you another issue entirely...
 
Upvote 0

sigster

Active Member
Licensed User
Longtime User
CustomListView flicker in release and debug mode


can this make the CustomListView flicker

Activity_Create
I use Activity.LoadLayout("main")

CreateListItemVerktakar
Dim p2 As Panel
p2.Initialize("")
p2.SetLayout(0, 0, Width, Height)
p2.LoadLayout("mainvalUndir")
 
Upvote 0
Top