Sub SetSingleItemBackground()
Dim StateIndex As Int = -1
Dim StateCount As Int
Dim LVO As JavaObject = lvBridgeFinder
Dim SLD As StateListDrawable = LVO.RunMethod("getSelector",Null)
Dim SLDO As JavaObject = SLD
StateCount = SLDO.RunMethod("getStateCount", Null)
Dim StateSet() As Int
Dim n As Int
For n = 0 To StateCount-1
StateSet = SLDO.RunMethod("getStateSet", Array(n))
If StateSet.Length = 2 Then
If StateSet(1) = 16842919 Then '16842919 from http://developer.android.com/reference/android/R.attr.html#state_pressed
StateIndex = n
Exit
End If
End If
Next
If StateIndex <> -1 Then
Dim oTransitionDrawable As Object = SLDO.RunMethod("getStateDrawable", Array(StateIndex))
Dim TDO As JavaObject = oTransitionDrawable
Dim oDrawable As Object = TDO.RunMethod("getDrawable", Array(1))
lvBridgeFinder.SingleLineLayout.Background = oDrawable
End If
End Sub