wimpie3 Well-Known Member Licensed User Longtime User May 15, 2014 #1 I'm trying to get to get this Java value Code: Copy int height = (int) res.getDimension(android.R.dimen.notification_large_icon_height); in B4A. I've tried with Code: Copy Dim r As Reflector r.Target = r.GetContext r.Target = r.RunMethod("getResources") r.Target = r.RunMethod("getDimension") Log(r.GetField("notification_large_icon_height")) But I get the error that "getDimension" is not unknown. I'm doing something wrong, but what?
I'm trying to get to get this Java value Code: Copy int height = (int) res.getDimension(android.R.dimen.notification_large_icon_height); in B4A. I've tried with Code: Copy Dim r As Reflector r.Target = r.GetContext r.Target = r.RunMethod("getResources") r.Target = r.RunMethod("getDimension") Log(r.GetField("notification_large_icon_height")) But I get the error that "getDimension" is not unknown. I'm doing something wrong, but what?
warwound Expert Licensed User Longtime User May 15, 2014 #2 Look at the signature of the getDimension method: public float getDimension (int id) Click to expand... You are not passing the required resource id parameter. There is no method with a signature: public void getDimension () Click to expand... Therefore the error message is correct - no method exists with that signature. Martin. Upvote 0
Look at the signature of the getDimension method: public float getDimension (int id) Click to expand... You are not passing the required resource id parameter. There is no method with a signature: public void getDimension () Click to expand... Therefore the error message is correct - no method exists with that signature. Martin.