btnBitmap.Initialize("btnBitmap")
Activity.AddView(btnBitmap, 40dip, 260dip, 60dip, 60dip)
' Define a BitmapDrawable for Enabled state
Dim bdwEnabled As BitmapDrawable
bdwEnabled.Initialize(LoadBitmap(File.DirAssets, "btnArrowDown0.png"))
' Define a BitmapDrawable for Pressed state
Dim bdwPressed As BitmapDrawable
bdwPressed.Initialize(LoadBitmap(File.DirAssets, "btnArrowDown1.png"))
' Define a StateListDrawable
Dim stdBitmap As StateListDrawable
stdBitmap.Initialize
Dim states(2) As Int
states(0) = stdBitmap.state_enabled
states(1) = -stdBitmap.state_pressed
stdBitmap.addState2(states, bdwEnabled)
Dim states(1) As Int
states(0) = stdBitmap.state_enabled
stdBitmap.addState2(states, bdwPressed)
' Set stdBitmap to button btnBitmap
btnBitmap.Background = stdBitmap