Android Question PreoptimizedCLV Seekbar (The Backcolor of the CustomListView is white while pressing the seekbar)

sonjahu

Member
Licensed User
Dear members,

i am new to B4A and what i have saw i like it very much! This is my first post.

What i don't understand is how to set the background-color in a preoptimized customlistview.

The background is allways white when i press down the seekbar. That is okay for a LightTheme but i am using DarkTheme (defined in the manifest).

Can someone help me please? (The file is atteched)

clv-error.png
.
clv-ok.png


this is my app:
Sub Class_Globals
    Private Root As B4XView
    Private xui As XUI
    Private Button1 As Button
    Private PCLV As PreoptimizedCLV
    Private clv As CustomListView
    Private Panel1 As Panel
End Sub

Public Sub Initialize
    
End Sub

'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("MainPage")
    
    Panel1.color = Colors.Yellow
    clv.DefaultTextBackgroundColor = Colors.blue
    clv.DefaultTextColor = Colors.white
    setItems
    Sleep(0)
    clv.JumpToItem(clv.Size -1)
End Sub

Sub setItems
    Dim sX1 As String
    clv.Clear
    PCLV.Initialize(Me, "PCLV", clv)
    For i = 1 To 2150
        sX1 = " this is: " & i
        clv.AddTextItem(sX1,"")
    Next
    PCLV.Commit
End Sub

Sub Button1_Click
    clv.JumpToItem(0)
    PCLV.B4XSeekBar1_ValueChanged(0)
End Sub

Sub clv_ItemClick (Index As Int, Value As Object)
    setItems

    Dim pnl As B4XView = clv.GetPanel(Index)
    pnl.GetView(0).Text = "clicked"
    PCLV.B4XSeekBar1_ValueChanged(Index)
End Sub

Sub clv_VisibleRangeChanged (FirstIndex As Int, LastIndex As Int)
    
End Sub
 

Attachments

  • clv-test.zip
    10.5 KB · Views: 80

sonjahu

Member
Licensed User
I know the possibility to use anchors but i wanted to show that changing the color of the panel was not the solution of that problem.

Also i did not see the overlay option.

Now it is working perfect.

Thank you very much!
 
Upvote 0
Top