Hello.
I have this code. It's very strange. I have some textviews which act as buttons. When the user presses them the background changes colour and the text colour also changes. it waits 2 seconds and then loads the next set of buttons, resetting all the colours.
However, the background ALWAYS changes, and the text colour almost never changes.
LoadPage 2 is where things get reset. If I take out the resetting of text colour to black, all the text remains white. So it's changing but not showing up. When I step through the code it all works fine.
What I can't understand is why the background colour changes perfectly, but the textcolour doesn't!?
I tried changing the order that they occur in this routine, switching it to rgb values to match the .color but it didn't make any difference.
Also, strangely, the first button press when loading the app always turns the text white. If there are only two 'buttons' loaded, then pressing the second one always turns the text white. Any other 'buttons' pressed only change the background colour.
Same occurs in debug and release modes.
Any ideas to try?
I have this code. It's very strange. I have some textviews which act as buttons. When the user presses them the background changes colour and the text colour also changes. it waits 2 seconds and then loads the next set of buttons, resetting all the colours.
However, the background ALWAYS changes, and the text colour almost never changes.
B4X:
Sub txvQ_Click
Dim txv As TextView
txv = Sender
Dim theInt As Int
theInt = txv.Tag
txv.TextColor = Colors.RGB(255,250,250)
txv.Color = Colors.RGB(132,0,0)
timer2.Enabled = True
End Sub
B4X:
Sub timer2_Tick
timer2.Enabled = False
LoadPage2
End Sub
What I can't understand is why the background colour changes perfectly, but the textcolour doesn't!?
I tried changing the order that they occur in this routine, switching it to rgb values to match the .color but it didn't make any difference.
Also, strangely, the first button press when loading the app always turns the text white. If there are only two 'buttons' loaded, then pressing the second one always turns the text white. Any other 'buttons' pressed only change the background colour.
Same occurs in debug and release modes.
Any ideas to try?