aaronk Well-Known Member Licensed User Longtime User Sep 29, 2015 #1 Hi, In the designer I have set a button with a Alpha level but when I tap on that button during runtime I want to change it's alpha value. How can I change the ColorDrawable Alpha value to something else when the user taps on the button ? Anyone able to help ?
Hi, In the designer I have set a button with a Alpha level but when I tap on that button during runtime I want to change it's alpha value. How can I change the ColorDrawable Alpha value to something else when the user taps on the button ? Anyone able to help ?
Lahksman Active Member Licensed User Longtime User Sep 29, 2015 #2 You could use the button_Down and button_Up events. Code: Copy Sub button1_Down Dim cd As ColorDrawable cd.Initialize(Colors.ARGB(100,50,50,250),0dip) button2.Background = cd End Sub Sub button1_Up Dim cd As ColorDrawable cd.Initialize(Colors.ARGB(255,50,50,250),0dip) button2.Background = cd End Sub Upvote 0
You could use the button_Down and button_Up events. Code: Copy Sub button1_Down Dim cd As ColorDrawable cd.Initialize(Colors.ARGB(100,50,50,250),0dip) button2.Background = cd End Sub Sub button1_Up Dim cd As ColorDrawable cd.Initialize(Colors.ARGB(255,50,50,250),0dip) button2.Background = cd End Sub