Android Question Change color

Alisson

Active Member
Licensed User
Hello.

I want change color of ListView to white:

B4X:
boton1.Initialize("boton1")
    boton1.TextColor = Colors.Black
    boton1.Text = "Volver al MyList."
    'panelg.AddView(boton1, 0dip, 0dip, 100%x, 9%y)

    Bitmap1.Initialize(File.DirAssets, "1.png")
    Bitmap2.Initialize(File.DirAssets, "2.png")
    Bitmap3.Initialize(File.DirAssets, "3.png")
    Bitmap4.Initialize(File.DirAssets, "4.png")
    Bitmap5.Initialize(File.DirAssets, "5.png")
    Bitmap6.Initialize(File.DirAssets, "6.png")
    Bitmap7.Initialize(File.DirAssets, "7.png")           


' Crea MyList (ListView)
    MyList.Initialize("MyList")
    MyList.Color=Colors.Black
    MyList.TwoLinesLayout.ItemHeight = 50dip
    MyList.TwoLinesLayout.Label.TextSize = 10dip
    MyList.TwoLinesLayout.Label.TextColor = Colors.Blue
    MyList.TwoLinesLayout.Label.Gravity = Gravity.CENTER
    MyList.FastScrollEnabled=True
    MyList.clear
    MyList.AddTwoLinesAndBitmap("OneName", "Private",Bitmap1)
    MyList.AddTwoLinesAndBitmap("TwoName", "Private", Bitmap2)
    MyList.AddTwoLinesAndBitmap("ThreeName", "Private", Bitmap3)
    MyList.AddTwoLinesAndBitmap("FourName", "Private", Bitmap4)
    MyList.AddTwoLinesAndBitmap("FiveName", "Private", Bitmap5)
    MyList.AddTwoLinesAndBitmap("SixName", "Private", Bitmap6)
    MyList.AddTwoLinesAndBitmap("SevenName", "Private", Bitmap7)
    Activity.AddView(MyList, 0dip, 0dip, 100%x, 420dip)
    Activity.AddMenuItem("Back","boton_menu")

I change color black to white, example:

Colors.Black

But not have successuful.

Thanks veru much
 

mangojack

Expert
Licensed User
Longtime User
Last edited:
Upvote 0
Top