Cableguy Expert Licensed User Longtime User Sep 6, 2015 #1 How can I set the Elevation property using reflection?
corwin42 Expert Licensed User Longtime User Sep 6, 2015 #2 Cableguy said: How can I set the Elevation property using reflection? Click to expand... Code: Copy Sub SetElevation(v As View, e As Float) Dim jo As JavaObject Dim p As Phone If p.SdkVersion >= 21 Then jo = v jo.RunMethod("setElevation", Array As Object(e)) End If End Sub If you use minSdkVersion=21 in your app you can remeove the if/then which just checks if the app is running at least on API 21. Upvote 0
Cableguy said: How can I set the Elevation property using reflection? Click to expand... Code: Copy Sub SetElevation(v As View, e As Float) Dim jo As JavaObject Dim p As Phone If p.SdkVersion >= 21 Then jo = v jo.RunMethod("setElevation", Array As Object(e)) End If End Sub If you use minSdkVersion=21 in your app you can remeove the if/then which just checks if the app is running at least on API 21.