Android Question How to Get Position from Custom View

incendio

Well-Known Member
Licensed User
Longtime User
Hi guys,

I have a Custom View, basically, is it an EditText with border.

When tried to get its position with CustomView.Left, it returns strange value.
On Designer Script, I set its position to 10, but it returns 17.

Usually, on a normal EditText, the position value is the value on Designer Script * Device Scale.
My Device is Nexus 7 with scale 1.33, so the correct value should be 13.
 

incendio

Well-Known Member
Licensed User
Longtime User
Sorry, on the above post, I mean, i set its possition to 10 on visual designer.

I didn't write any code on designer script.

I will check it when in front computer.
 
Last edited:
Upvote 0

incendio

Well-Known Member
Licensed User
Longtime User
You were right. Although haven't any code in Designer Script, AutoScale is a default script & just knew about this. Thanks for your clarification.
 
Upvote 0
Top