Programmically change alpha of scrollview?

JonPM

Well-Known Member
Licensed User
Longtime User
I have a scrollview added to an activity programmically, and I need to change its alpha. How is this done?
 

joseluis

Active Member
Licensed User
Longtime User
You can do that using reflection library.

C&P this sub:
B4X:
Sub SetAlpha(Control As View, Alpha As Int)
   Dim r as Reflector
   r.Target = Control.Background
   r.RunMethod2("setAlpha", Alpha, "java.lang.int")
End Sub
And then you can change the alpha of any view like this:
B4X:
SetAlpha(MyPanel, 200)
 
Upvote 0
Top