JonPM Well-Known Member Licensed User Longtime User Jan 31, 2012 #1 I have a scrollview added to an activity programmically, and I need to change its alpha. How is this done?
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 Jan 31, 2012 #2 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
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)
JonPM Well-Known Member Licensed User Longtime User Feb 1, 2012 #3 Thanks! Sent from my DROIDX Upvote 0