Android Question Getting the same Values from designer in code

rafaelmotaquintana

Active Member
Licensed User
I'm sorry I've posted something like this before, but got no answer. What I'm looking for is to get the exact number in Left, Width and Height properties for a panel and label, in code.
What I mean is this. If some panel has a value of 10 in LEFT, and 1dip in the device is equal to 3, in code when you test the LEFT property, you get 30. That's fine, I understand.
That's without the autoscale.
You may say, well, if you want to get the value 10 that shows in the designer, just divide it by 1dip and you'll have it.
That's right. But in some devices, one dip is 1.7777 an something like that, and the result is not exact. One point different and my objective fails. Hope anyone knows what I mean. Thanks in advance
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…