Android Question change reflector to java object

Discussion in 'Android Questions' started by ArminKH, Jul 31, 2015.

  1. ArminKH

    ArminKH Well-Known Member

    hi can every body please convert this code to JavaObject?
    Code:
    Dim Bounds As Rect
          Bounds.Initialize(
    0,0,0,0)
      
    Dim r As Reflector
          r.Target=lbl
          r.Target = r.GetContext
          r.Target = r.RunMethod(
    "getResources")
          r.Target = r.RunMethod(
    "getDisplayMetrics")
          
    Return((Bounds.Right - Bounds.Left)* r.GetField("xdpi")/ 160)
    i can't change this r.Target = r.GetContext to javaobject
    THIS code not worked for me
    Code:
    Dim jo =LBL As JavaObject
           jo.RunMethod(
    "getResources",Null)
           jo.RunMethod(
    "getDisplayMetrics",Null)
           
    Return((Bounds.Right - Bounds.Left)* jo.GetField("xdpi")/ 160)
    tnx
     
    Last edited: Jul 31, 2015
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice