In the app I'm working on I use the .BackGround property a lot. For my buttons I have declared ButtonColor as ColorDrawable.
But sometimes, when clicking around in the app, the appearence of some buttons change. Below is an example of a button not showing up correctly.
The left is how the "Verwijderen" button should look. On the right how it shouldn't.
Sorry, but how do you expect us to help you without any concrete information.?
How do you define the Backgrounds ?
How do you set the background to the views.
Without seeing what exactly you have done, it is almost impossible to give a concrete advice.
The only point I can guess is that you declare the backgrounds once and set it to several views.
You need to initialize one background for each view.
The most efficient way to get concrete help would be if you posted a small project showing the problem.
Allowing us to see what exactly you have done and how and we could test it and suggest a solution.
To set ColorDrawable correctly to any views create a Sub like this
B4X:
Sub SetCD (backcolor As Int, radius As Int, borderwidth As Int, bordercolor As Int) As ColorDrawable
Dim cd As ColorDrawable
cd.Initialize2(backcolor, radius, borderwidth, bordercolor)
Return cd
End Sub
OK , sorry for the fuzzy question. If I understand it correctly I have to declare a background for each view. Even if I want all the buttons to look the same I have to declare a background for each of them. I will try it tomorrow. And I will do it the way SageNut suggested.
Next time I'll try to give more details and be more clear. Please bear with me..