Tuesday, February 27, 2018

What is android:ems attribute in Edit Text?











In EditText there is an attribute named android:ems. The description
is "Makes the EditText be exactly this many ems wide"



What does ems mean?


Answer




Taken from: http://www.w3.org/Style/Examples/007/units:




The em is simply the font size. In an element with a 2in font, 1em
thus means 2in. Expressing sizes, such as margins and paddings, in em
means they are related to the font size, and if the user has a big
font (e.g., on a big screen) or a small font (e.g., on a handheld
device), the sizes will be in proportion. Declarations such as
'text-indent: 1.5em' and 'margin: 1em' are extremely common in CSS.





em is basically CSS property for font sizes.


No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...