Android Question CustomListView

Cenny

Active Member
Licensed User
Longtime User
Hi,

Is it possible to change the backcolor of a single text item of the customlistview?

Cenny
 

mangojack

Well-Known Member
Licensed User
Longtime User
As a result of CLV Click_Event ...
B4X:
Sub clv1_ItemClick(Index As Int, Value As Object)
    Dim p As B4XView = clv1.GetPanel(Index)
    Dim txt As B4XView = p.GetView(1)  '@@@ EditText is 2nd view within CLV rowItems layout.
    txt.Color = Colors.red  
End Sub

If you just want a color an EditText for a particular Item / Row just substitute Index for the targeted row number ( ... -1 of course)
 
Upvote 0

Cenny

Active Member
Licensed User
Longtime User
As a result of CLV Click_Event ...
B4X:
Sub clv1_ItemClick(Index As Int, Value As Object)
    Dim p As B4XView = clv1.GetPanel(Index)
    Dim txt As B4XView = p.GetView(1)  '@@@ EditText is 2nd view within CLV rowItems layout.
    txt.Color = Colors.red 
End Sub

If you just want a color an EditText for a particular Item / Row just substitute Index for the targeted row number ( ... -1 of course)
Thanks for the help
 
Upvote 0
Top