btn0.setText("+");
btn0.setTextColor(Colors.DarkGray);
btn0.setTextSize(32);
btn0.setBackgroundColor(Colors.LightGray);
btn0.setTextColor(Colors.DarkGray);
btn0.setText(Integer.toString(numbers[i]));
btn0.setTextSize(32);
btn0.setText("-");
btn0.setTextSize(32);
Yes, all the properties that can be specified in the designer are actually assigned to a view when the activity is built.
Dim Test As Button
test.Initialize (test)
ButtonColour = test.TextColor
test.RemoveView
General.ColourButtons (Activity )
General.ColourButtonsP (PanelName )
Sub ColourButtons (Value As Activity)
Dim DummyB As Button
Dim DummyP As Panel
For i = 0 To Value.NumberOfViews - 1
If Value.GetView(i) Is Button Then
DummyB = Value.GetView (i)
DummyB.TextColor = main.ButtonColour
End If
If Value.GetView (i) Is Panel Then
DummyP = Value.GetView (i)
For l = 0 To DummyP.NumberOfViews - 1
If DummyP.GetView (l) Is Button Then
DummyB = DummyP.GetView (l)
DummyB.TextColor = main.ButtonColour
End If
Next
End If
Next
End Sub
Sub ColourButtonsP (Value As Panel)
Dim DummyB As Button
Dim DummyP As Panel
For i = 0 To Value.NumberOfViews - 1
If Value.GetView(i) Is Button Then
DummyB = Value.GetView (i)
DummyB.TextColor = main.ButtonColour
End If
If Value.GetView (i) Is Panel Then
DummyP = Value.GetView (i)
For l = 0 To DummyP.NumberOfViews - 1
If DummyP.GetView (l) Is Button Then
DummyB = DummyP.GetView (l)
DummyB.TextColor = main.ButtonColour
End If
Next
End If
Next
End Sub
You can copy all the views to a list and then handle the list views. This will allow you to use a single method. Don't worry about copying the views as only a reference is copied.The above two routines are exactly the same as I could not figure out how to deal with activities and panels at the same time (anyone any ideas)
You can copy all the views to a list and then handle the list views. This will allow you to use a single method. Don't worry about copying the views as only a reference is copied.
Another thing you can do is to call this method recursively when you find a panel. This way it will support and structure of panels within panels.
Done and posted.
Being an Atrix user, I see the same issue... my question is...
Is it an Atrix problem or B4A since I don't see it with any other apps that I have loaded...
Thanks !
Gary M
I don't know why but they just are a different colour to the usual Android defaults.I did not read the exact answer as to why Atrix/M8600 have dark buttons.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?