Android Question mLastTouchDownY variable

Alberto Iglesias

Well-Known Member
Licensed User
Longtime User
How can I get the internal values from panel variables?

I need to get the mLastTouchDownY value...


I tried this but is not a correct way!

B4X:
    Dim JO As JavaObject = objParent
    Dim lX As Double = JO.GetField("mLastTouchDownY")

lasttouch.png
 

moster67

Expert
Licensed User
Longtime User
I don't think you can use JavaObject here since the field is not exposed in the ViewGroup API.
You will need to use reflection, something similar to this:

B4X:
Dim obj1 As Reflector
obj1.Target = Panel1
Log(obj1.GetField("mLastTouchDownY"))
Log(obj1.GetField("mOldHeightMeasureSpec"))
 
Upvote 0
Top