I'm trying to set Pressed- and Disabled-Colors for labels. In B4A I've used ColorDrawables and StatelistDrawable for it. How can i do in B4i?
If it's not possible, I could use a CustomButton instead but if it's Label has a long Text, it shows it with "..." in the middle. In this case I dont want to reduce the font size, I want to show the "..." at the end of the Text.
It would be nice to be able to set text and background colors for the states, but I would prefer the background color.
Do you have an idea to realize it?
If it's not possible, I could use a CustomButton instead but if it's Label has a long Text, it shows it with "..." in the middle. In this case I dont want to reduce the font size, I want to show the "..." at the end of the Text.
Sub SetPressedBackgroundColor(Color As Int, B As Button)
Dim P As Panel
P.Initialize("")
P.Color = Color
P.Width = B.Width
P.Height = B.Height
Dim C As Canvas
C.Initialize(P)
Dim NaObj As NativeObject = B
NaObj.RunMethod("setBackgroundImage:forState:", Array(C.CreateBitmap, 1))
End Sub