Utils.SetBtnSaveDrawable(BtnSave)
Dim sdk As Phone
If sdk.SdkVersion > 20 Then
Dim jo As JavaObject = BtnSave
jo.RunMethod("setStateListAnimator", Array(Null))
End If
Sub SetBtnSaveDrawable(b As Button)
Dim cdEnabled As GradientDrawable
cdEnabled.Initialize("TOP_BOTTOM", Array As Int(Azzurro,AzzurroSfumato))
cdEnabled.CornerRadius = b.Height/2
Dim cdPressed As GradientDrawable
cdPressed.Initialize("TOP_BOTTOM", Array As Int(Azzurro,AzzurroSfumato))
cdPressed.CornerRadius = b.Height/2
Dim cdDisabled As GradientDrawable
cdDisabled.Initialize("TOP_BOTTOM", Array As Int(AzzurroDisabled,AzzurroSfumatoDisabled))
cdDisabled.CornerRadius = b.Height/2
Dim stdGradient As StateListDrawable
stdGradient.Initialize
stdGradient.AddState(stdGradient.State_Pressed, cdPressed)
stdGradient.AddState(stdGradient.State_Enabled,cdEnabled)
stdGradient.AddState(stdGradient.State_Disabled, cdDisabled)
b.Background = stdGradient
End Sub