Sub test(Send As Button)
'Gradient background for the button
Dim background As GradientDrawable
Dim Clrs(2) As Int
Clrs(0) = Colors.RGB(220, 220, 220)
Clrs(1) = Colors.RGB(120, 120, 120)
background.Initialize("TOP_BOTTOM", Clrs)
'Background of an action item if it is pressed
Dim background_pressed As ColorDrawable
background_pressed.Initialize(Colors.RGB(120, 120, 120), 0)
'Define a StateListDrawable that has the background for our button and
'a background if an action item is pressed.
Dim bd As StateListDrawable
bd.Initialize
bd.AddState(bd.State_Pressed, background_pressed)
bd.AddState(bd.State_Enabled, background)
bd.AddCatchAllState(background)
Send.background = bd
End Sub